-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Multiple NameSpaces for a XML Element #178
Comments
There are two separate ways of naming supported. One is for the type. Types only have a single name (although you could filter your reader to switch names). However, you can also specify the name in the use context (on the properties), in which case the default policy uses that as the priority. For top-level you can pass along the root tag name to use, and do it that way. For reading the top level tag is automatically detected from the xml if you don't specify it. A final thing you may want to do is to introduce some namespaces. If you use the @XmlNamespaces annotation you can specify the namespaces to be generated for that tag (which means your xml is not polluted with all kinds of namespace attributes all over the place). |
This should now be supported using a namespaces annotation. |
@pdvrieze Can't find the XmlNamespaces or namespaces annotations. Could you please elaborate? |
Sorry, I didn't remember the name properly. See https://pdvrieze.github.io/xmlutil/serialization/nl.adaptivity.xmlutil.serialization/-xml-namespace-decl-spec/index.html |
I am trying to configure multiple namespaces to a XML Element inorder but couldn't find a option to achieve it using Xml Serialization.
Current code:
Trying to achieve the Below which doesn't seem possible:
Is there any option to achieve it ? If so, how to achieve the same ?
Else is there any alternate workaround to achieve the same ?
The text was updated successfully, but these errors were encountered: