RE: [xmljs-users] parsing problem
Brought to you by:
djoham,
witchhunter
From: Chandan K. <cha...@bl...> - 2004-01-20 06:54:50
|
Thanks a lot. The new file worked perfectly. The old file works if the namespaceaware property is set to false as shown here: ...................................................... var parser = new DOMImplementation(); //this property has to be set to false to enable the parser to read tags closed in a single line //for eg <A ........ /> parser.namespaceAware = false; ....................................................... There is another problem with the file in internet explorer. This problem was present in the old file too. An "exception thrown but not caught" error is thrown in IE. This problem vanished when line 428 in the new file was commented: ...................................................... else if(iEvt == XMLP._ERROR) { //throw(new DOMException(DOMException.SYNTAX_ERR)); ......................................................... Thanks, Chandan |-----Original Message----- |From: David Joham [mailto:dj...@ya...] |Sent: Tuesday, January 20, 2004 1:27 AM |To: Chandan Kumar; xml...@li... |Subject: Re: [xmljs-users] parsing problem | | |--- Chandan Kumar <cha...@bl...> wrote: |> Hi, |> I started using xml for script just yesterday. |> |> I seem to be having a problem with parsing xml. If the xml |contains a line |> like this |> |> <A attribute1 ='value1' attribute2='value2' /> |> |> the parser does not read this in the domimplementation |object. I am using |> the w3cdom implementation. |> |> On the other hand, |> xml like <A></A> works prefectly allright. |> |> Please let me know how to get over this problem. |> |> Thanks, |> Chandan |> | |I believe I have found the root problem for this. I have |attached a new (gzipped) xmlw3cdom.js to |this Email for your testing purposes. Please let me know if |this fixes your problem. If it |doesn't, can you please send a full XML code snippit to me? |For reasons yet unexplained, the 3.0 |parser seems to sometimes parse tags like this and sometimes |not. I think what I'm sending you now |will always parse them correctly. At least it has in all of my |tests so far. | |Best regards, | |David | |__________________________________ |Do you Yahoo!? |Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes |http://hotjobs.sweepstakes.yahoo.com/signingbonus | |