[Expat-discuss] extracting attributes
Karl Waclawek
karl at waclawek.net
Mon Apr 12 17:27:54 EDT 2004
----- Original Message -----
From: <terrasurfer at knology.net>
To: <expat-discuss at libexpat.org>
Sent: Monday, April 12, 2004 5:23 PM
> I'm having trouble extracting attributes when parsing XML using
> expat. I used XML_SetAttlistDeclHandler() to define a handler
> for attributes. But the function I defined in
> XML_SetAttlistDeclHandler() doesn't ever run!
That's because it reports attribute declarations in the DTD!
> Am I defining my attribute handler with the correct function?
> Is extracting attributes the same as extracting start tags and
> data?
Yes, and you don't need an extra call-back.
The StartElementHandler() call-back already reports the attributes.
Karl
More information about the Expat-discuss
mailing list