Advertisement
Guest User

Untitled

a guest
Nov 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <foo:Object xsi:schemaLocation="http://foo.com/ http://foo.com/foo.xsd"
  3. xmlns:ns0="http://lipsum.com/bar" xmlns:foo="http://foo.com/"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5. <foo:Some attr1="601"/>
  6. <foo:Others>
  7. <bar:Another xsi:schemaLocation="http://lipsum.com/bar
  8. http://lipsum.com/bar.xsd" xmlns:bar="http://lipsum.com/bar">
  9. <bar:SomeOther attr2="01"/>
  10. </bar:Another>
  11. </foo:Others>
  12. </foo:Object>
  13.  
  14. @XmlAnyElement(lax = true)
  15. @XmlElementRefs({
  16. @XmlElementRef(name="Another", type=Another.class, required=false)
  17. })
  18. protected List<Object> any;
  19.  
  20. 1.- Ignore the namespaces from @XmlElementRef classes during the marshalling.
  21. 2.- Remove the not used namespaces aka NS[0-9] prefixes from the root element.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement