Rectangle 27 0

java Define namespaces tags so that generated XML have those tags?


Unfortunately, per the XSTream FAQ, XStream does not support XML namespaces unless using a StAX parser

If that question isn't exactly what you want, look through the links in the Related section there. If none of those fit your situation, you should ask a new question rather than extend this conversation in comments. Thanks.

Not every XML parser supports namespaces and not every XML parser that supports namespaces can be configured within XStream to use those. Basically namespaces must be supported individually for the different XML parsers and the only support for namespaces that has currently been implemented in XStream is for the StAX paser. Therefore use and configure the StaxDriver of XStream to use namespaces.

There's already a fine answer there by JAXB master Blaise Doughan. Go with it.

sorry but that doesn't tell how to put two different namespaces in .java file , There is only one namespace ns0.

Note
Rectangle 27 0

java Define namespaces tags so that generated XML have those tags?


Unfortunately, per the XSTream FAQ, XStream does not support XML namespaces unless using a StAX parser

If that question isn't exactly what you want, look through the links in the Related section there. If none of those fit your situation, you should ask a new question rather than extend this conversation in comments. Thanks.

Not every XML parser supports namespaces and not every XML parser that supports namespaces can be configured within XStream to use those. Basically namespaces must be supported individually for the different XML parsers and the only support for namespaces that has currently been implemented in XStream is for the StAX paser. Therefore use and configure the StaxDriver of XStream to use namespaces.

There's already a fine answer there by JAXB master Blaise Doughan. Go with it.

sorry but that doesn't tell how to put two different namespaces in .java file , There is only one namespace ns0.

Note
Rectangle 27 0

java Define namespaces tags so that generated XML have those tags?


Unfortunately, per the XSTream FAQ, XStream does not support XML namespaces unless using a StAX parser

If that question isn't exactly what you want, look through the links in the Related section there. If none of those fit your situation, you should ask a new question rather than extend this conversation in comments. Thanks.

Not every XML parser supports namespaces and not every XML parser that supports namespaces can be configured within XStream to use those. Basically namespaces must be supported individually for the different XML parsers and the only support for namespaces that has currently been implemented in XStream is for the StAX paser. Therefore use and configure the StaxDriver of XStream to use namespaces.

There's already a fine answer there by JAXB master Blaise Doughan. Go with it.

sorry but that doesn't tell how to put two different namespaces in .java file , There is only one namespace ns0.

Note