Re: [xml] xmlreader + entities



On Sat, Jul 19, 2003 at 12:56:33PM -0400, Daniel Veillard wrote:
Is there a way to get notification of entity declarations with the
xmlreader interface?  I see there is a node type (6) for them, but
when I parse a simple document with entity declarations parsing
doesn't stop at those nodes.  If I can't get them as the document is
being parsed, can I look them up afterwards in some internal
structure?

   Hum, I think we tried to follow the behaviour from C# XmlTextReader
   interface, maybe we missed that when going over comparison with
   Stephane Bidoul. Do you want to see the entities declarations or
   references ?

The declarations, the references seem to be working fine.  I wrote a
quick test program and never got any nodes with type 6 back.

Also is there a way to avoid using the numerical values for the node
type, i.e. are they defined in some header somewhere?

  Hum, so far we have only numbers there. Seems that C# defines them
  as enums too:

  http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html

maybe we should define an enum (but possibly change the names, at
least uppercase and prefix them).

Yep that's what I had in mind, I had just defined my own enum in the
interim.
 
On an unrelated note I see that it's possible to enable -fexceptions
when building via CFLAGS, which didn't seem to work before.

  Hum, right I should have added this to configure.in ...

Yes it would be great if you could put that in.  It can just be an
option, not necessarily on by default.  As discussed before I think the
only effect is increased code size, but I suppose some users will worry
about that kind of thing.

cheers,

Graham.

-- 
Graham Bennett



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]