|
From: Todd B. <TBr...@ja...> - 2001-05-03 22:31:26
|
The semicolon is necessary. "&" is what's called
a "predefined entity" and is the XML of representing
the "&" character. The other four predefined entities
are:
< which means <
> which means >
' which means '
" which means "
So, I THINK this is valid XML, but TclXML doesn't like
it at all!
Todd.
> -----Original Message-----
> From: James C. Moore [mailto:jm...@qn...]
> Sent: Thursday, May 03, 2001 4:17 PM
> To: Todd Bradley; 'tcl...@li...'
> Subject: Re: [Tclxml-users] why won't TclXML parse this?
>
>
> I'm pretty sure you are not allowed to use semicolons. My
> xml is a little
> rusty, though.
>
> > I'm by no means an XML expert, so this may be a stupid
> > question, but I was wondering why the TclXML parser
> > chokes on something like this:
> >
> > <foo bar='Black & White'/>
> >
> > The & is giving ParseCommand fits. If I take out
> > the & then things work fine.
> >
> > The trace I'm getting looks like this:
> >
> > {invalid attribute list} around line 0
> > while executing
> > "::sgml::Error {invalid attribute list} around line 0"
> > ("uplevel" body line 1)
> > invoked from within
> > "uplevel #0 $options(-errorcommand) [list $attr around line
> $state(line)]"
> > (procedure "ParseEvent:ElementOpen" line 21)
> > invoked from within
> > "ParseEvent:ElementOpen $tag $param options -empty 1"
> > ("*,0,,/" arm line 5)
> > invoked from within
> > "switch -glob -- [string length $tag],[regexp {^\?|!.*}
> $tag],$close,$empty
> > {
> >
> > 0,0,, {
> > # Ignore empty tag - dealt with non-normal
> mode above
> > ..."
> > (procedure "::sgml::parseEvent" line 118)
> >
> >
> >
> > Possibly relevant version numbers from xml.tcl:
> >
> > package provide xml 1.9
> >
> > package require sgml 1.7
> >
> >
> >
> > Todd.
> > ----
> > Todd Bradley - Director, Support Services - Jabber.com
> > tbr...@ja... - 303-308-3666
> >
> > See you at JabberCon August 20 and 21 - www.jabbercon.com
> >
> > _______________________________________________
> > Tclxml-users mailing list
> > Tcl...@li...
> > http://lists.sourceforge.net/lists/listinfo/tclxml-users
> >
> >
>
> --
> James C. Moore, Ph.D.
>
>
|