W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

Re: [SVGMobile12] A.7.19 parseXML

From: Jim Ley <jim@jibbering.com>
Date: Fri, 27 Jan 2006 17:44:42 -0000
To: www-svg@w3.org
Message-ID: <drdm6t$ivc$1@sea.gmane.org>


"Jonathan Watt" <jwatt@jwatt.org> wrote in message 
news:43DA5718.7090309@jwatt.org...
> 4) Behavior for invalid markup is unspecified.
>
> When you pass invalid markup to DOMParser in Mozilla it will create 
> <parsererror> elements in place of the invalid markup.

Hi Jonathon Watt,

This seems a rather peculiar implementation...  How do you distinguish 
between success and failure in the above situation?

i.e. consider:

x=new DOMParser();
out=x.parseFromString('<parsererror 
xmlns="http://www.mozilla.org/newlayout/xml/parsererror.xml">XML Parsing 
Error: no element found Location: file:///c:/test.html Line Number 1, Column 
6:<sourcetext> -----^</sourcetext></parseerror', "text/xml");

Which you might do if you were using a tool which consumed bug reports, how 
do you know if you've got a real error, or parsing failed?

Cheers,

Jim. 
Received on Friday, 27 January 2006 17:45:56 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT