Announcement Announcement Module
Collapse
No announcement yet.
XML String to JDom Document or Element? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML String to JDom Document or Element?

    Hi guys

    I'm currently using the following code
    Code:
            JDOMSource source = new JDOMSource(parent);
            StringWriter sw = new StringWriter();
            StreamResult result = new StreamResult(sw);
            getWebServiceTemplate().sendSourceAndReceiveToResult(source, result);
            SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
            Reader stringReader = new StringReader(sw.getBuffer().toString());
            Document jdomDocument = saxBuilder.build(stringReader);
            return jdomDocument.getRootElement();
    to get my response from the called web service turned into a JDOM Element.

    Could you please show me a different way of getting it turned into a JDOM Element, as I'm experiencing a very odd
    java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredDocumentImpl.getXmlS tandalone()Z
    when running the code.

    Any ideas???

    Cheers.

  • #2
    What are you trying to accomplish with this code?

    Comment

    Working...
    X