>> My question is why does the '>' char not translate to > also? << When serializing XML, translating a '>' is unnecessary because it will not cause the parser any confusion--not so for '<' or '&' characters. The value (in the DOM) of the attribute string should be exactly what you set it to, but it should appear with the '<' translated to an entity when you serialize the DOM to XML.
-- fas F. Andy Seidl, Co-founder MyST Technology Partners -----Original Message----- From: Guy Sharon [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 07, 2004 5:32 AM To: [EMAIL PROTECTED] Subject: Translation of some characters to entities I am building a DOM tree in the code and one of the elements has a xs:string type attribute where its value may consist of characters like '>' and '<'. When I set the attribute's value as follows element.setAttribute("attr1","g>z and w<f"); The value (for element.getAttribute("attr1");) is actually - "g>z and w<f" My question is why does the '>' char not translate to > also? and how do I get it translated? - the xml file created from the DOM is not valid without > Thanks. _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfeeR Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]