Hi Pierpaolo I am still having this problem with DOMParser. I set the feature as shown: p.setFeature("http://apache.org/xml/features/dom/create-entity-ref-nodes",false); "Love & Sweetness" is converted to "Love Sweetness". When I traverse the DOM there is only one child node with the text "Love Sweetness". On the other hand & in the file seems to work now. Any ideas would be appreciated
cheers Jim Pierpaolo Fumagalli wrote: > Bluestream - Boris Garbuzov wrote: > > > > Hello, guys. Can you please tell us how to join your Xerses news group > > or mailing list or refer us to right people? Particularly we have > > question how to handle ampersant "&" with your parser. If the text "Love > > & Sweetness" is a fragment of xml file, then it gives an error. If to > > change & to &, it just swallows it unlike other parsers who convert > > it to regular ampersant. > > I believe you're using a DOMParser, and you don't find a text node for > your & character. This is because an entity reference node is > inserted and this one has a child text node with the value of the &...; > thing. > Try to disable setting up the parser in this way: > > > DOMParser p=new DOMParser(); > > p.setFeature("http://apache.org/xml/features/dom/create-entity-ref-nodes",false); > > p.parse(in); > > Document document=p.getDocument(); > > It should work... Otherwise send mail to the appropriate mailing list > wich is [EMAIL PROTECTED] > > Pier -- ---------------------------------------------------------- Jim Tivy - Bluestream Database Software Corp. 1168 Hamilton Street, Suite 200, Vancouver BC V6B 2S2 Tel: (604) 669-4469 ext 116 Fax: (604) 669-4469 E-Mail: mailto:[EMAIL PROTECTED] http://www.bluestream.com ----------------------------------------------------------