4 Replies Latest reply on May 10, 2004 1:20 PM by Collin

    DOMSource Transformation

    jamescg Newbie

      Don't know exactly where to put this one.

      I have installed JBoss 3.2.3 on Windows NT 4 Service pack 6, Window sXP and also Solaris 5.8. On Solaris everything is fine but on Windows I have a problem transforming a DOMSource.

      If I have the XML



      Two


      One



      And then evaluate the XPath /wrapper/group[@name="one"] using the XPathAPI and get the node back. Using this node I create a DOMSource and then transform the node back into it XML using the code

      TransformerFactory tFactory = TransformerFactory.newInstance();
      Transformer transformer = tFactory.newTransformer();
      transformer.setOutputProperty("omit-xml-declaration", "yes");

      StringWriter sw = new StringWriter();
      StreamResult result = new StreamResult(sw);

      DOMSource source = new DOMSource(theNode);
      transformer.transform( source, result );

      nodeString = sw.getBuffer().toString();

      OnSolaris I get the xml


      Two


      but on windows I get the XML



      Two


      One



      I have installed Tomcat 4 and 5 as standalone server and the code works ok here it is only when I am using JBoss on Window that this error happens

      Anyone have any ideas ?

      Thanks

      James