DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10732>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10732

JAXP1.1

           Summary: JAXP1.1
           Product: Xerces2-J
           Version: 2.0.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: JAXP
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I use JAXP1.1, JDK 1.3.1 on WIN NT 4.0, J Builder 5.0
I have a question concerning writing DOM tree to String using Element.toString()
method. I have element which have text node containing text "45 &#176;". After
call method toString() I get String: "45 &amp;#176;" and not as I expected "45
&#176;". My DOM tree is created this way:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
try {
  DocumentBuilder db = dbf.newDocumentBuilder();
  doc = db.newDocument();
} catch(ParserConfigurationException pce) {
  System.out.println("Problem with parser configuration. Exit.");
  System.exit(-36);
}
Element is created this way:
Element turnProcedure = doc.createElement("TURN_PROCEDURE");
turnProcedure.setAttribute("TYPE", "45 &#176;");

...

then I do smth like that:
String out = turnProcedure.toString();

And I got smth like that:
<TURN_PROCEDURE>45 &amp;#176;</TURN_PROCEDURE>
----------

Is there any way to protect before changing & char into &amp; ?

Greetings.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to