Hi

I am having a problem with & dissappearing in the DOM when I use the
parser to create it.

I tried using the
p.setFeature("http://apache.org/xml/features/dom/create-entity-ref-nodes",false);
as suggested below, but it failed also when I looked at the node value
using the TreeWalker sample which uses getNodeValue on the node - the
ampersand was gone.

Any other ideas.

cheers
Jim


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
----------------------------------------------------------


Reply via email to