[ https://issues.apache.org/jira/browse/WSCOMMONS-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved WSCOMMONS-254. --------------------------------------- Resolution: Fixed Assignee: Andreas Veithen > AXIOM DOM based implementation fails to parse documents that start with xml > comment. > ------------------------------------------------------------------------------------ > > Key: WSCOMMONS-254 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-254 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Reporter: Gennady Shumakher > Assignee: Andreas Veithen > > DOM based AXIOM implementation fails when the parsed document starts with xml > comment. > Code example: > String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><!-- > comment --><store><book><id >1</id><title >Book A</title></book></store>"; > ByteArrayInputStream bais = new > ByteArrayInputStream(xml.getBytes()); > XMLStreamReader reader = > XMLInputFactory.newInstance().createXMLStreamReader(bais); > // Create dom builder > StAXOMBuilder doomBuilder = new > StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), reader); > // Get the document element > OMElement newElem = doomBuilder.getDocumentElement(); > if (!(newElem instanceof org.w3c.dom.Element)) > { > System.out.println("Failed to read a > org.w3c.dom.Element !!!"); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.