Re: [xml] Getting the element's attributes with SAX2



On Tue, Mar 14, 2006 at 04:26:59PM +0100, Antonio Pozuelo wrote:
Hi:

I'm using SAX2 interface in my parsing xml program.
When I use version 1 I read OK the attributes for every element with 
xmlSAX2StartElement

But when I use the version 2 ( putting XML_SAX2_MAGIC in /initialized/ 
register in my xmlSAXHandler), I can read  the /localneme/, /prefix /and 
/namespaces /but I have problems to achieve others attributes.
I use the xmlSAX2StartElementNs function.

How could I get them?

   See xmlSAX2StartElementNs() in SAX2.c around line 2265

{
   ...
   strcpy(ctx->my_attributes[i],attributes[i])

   ...
}

Is anything  wrong?

  How am I supposed to tell ? what is i ? And no I won't debug your code.

------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail

  Those terms are completely incompatible with the use of this mailing-list.
See http://xmlsoft.org/bugs.html, get them removed or stop posting from
your work. If your lawyers can't understand that we need free exchange of 
information, maybe they can pay for private support outside of this list.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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