[
https://issues.apache.org/jira/browse/ATTIC-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15249227#comment-15249227
]
Henri Yandell commented on ATTIC-152:
-------------------------------------
I sometimes ask projects that question if they are still active enough, but I
don't see anything in my email re: XMLBeans.
This StackOverflow question covers the subject though, so I've added that to
the Attic page. The verdict was JAXB.
> Invalid xml generated for an element with namespace uri using
> XmlObject/XmlCursor
> ---------------------------------------------------------------------------------
>
> Key: ATTIC-152
> URL: https://issues.apache.org/jira/browse/ATTIC-152
> Project: Attic
> Issue Type: Bug
> Environment: JRE 1.8
> Windows
> Reporter: graju256
> Labels: XmlCursor, XmlObject
>
> // Using XmlBeans:-
> // Below code uses XmlBeans APIs to generate well-formed XML for an element
> with namespace URI.
> // Looks like the generated synonym to the given namespace URI seemed
> invalid.
> // Expected: <t1:HelloWorld xmlns:t1="http://www.w3schools.com/xml/"/>
> // Actual: <x/:HelloWorld xmlns:x/="http://www.w3schools.com/xml/"/>
> XmlObject object = XmlObject.Factory.newInstance();
> XmlCursor cursor = object.newCursor();
>
> cursor.toNextToken();
> cursor.beginElement(new QName("http://www.w3schools.com/xml/", "HelloWorld"));
> System.out.println(object.xmlText());
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)