[JDEV] Java XML Parsers
Al Sutton
al at alsutton.com
Sun Dec 30 06:03:06 CST 2001
Daniel,
I think you may be a little confused. I think you'll find that there are
specs for SAX and DOM parsers for XML, but XML itself is (or at least
was originally) purely a data representation format, and as such didn't
include the detail of how to parse it's contents. I'm not claiming my
parser is SAX or DOM compliant, but mearly a library capable of parsing
XML.
I fully accept it doesn't support processing directives (such as the
<?xml element which is used to detail encoding), and that enforcing all
tags are pushed into lower case isn't ideal (and is something that is
optional on version I currently am working on), but it seems to fit a
need many people have for a small simple parser.
Myself and others have used my parser in a number of products which
handle the jabber protocol and thought it may be of use to Matt.
Al.
On Sun, 2001-12-30 at 10:15, Daniel Veillard wrote:
> On Sun, Dec 30, 2001 at 09:38:56AM +0000, Al Sutton wrote:
> > I'm biased, but I prefer the one I wrote. It's available from
> > http://www.alsutton.com/ under the My Software link.
> >
> > It's designed to be small, and isn't fully featured, but does enough to
>
> Then it's probably not an XML parser.
> tagName = data.substring(0,spaceIdx).toLowerCase();
> for example is very suspicious (XML Names are case sensitive),
> it doesn't seems to look at the XML Declaration to check encodings etc...
> In a nutshell, though it may be able to extract informations from a well
> formed XML document it doesn't look like an XML parser and you should
> not advertize it as such, sorry for being pedantic but it's not good.
>
> XML defines relatively precisely the processing model of the
> parser including error detection and signalling. The goal is to have
> interoperable implementations. Deviation from the spec makes thing
> harder for the users, for example a Jabber client based on your parser
> will not react similary to a client based on an XML parser.
>
> Daniel
>
> --
> Daniel Veillard | Red Hat Network https://rhn.redhat.com/
> veillard at redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list