Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Help with SAX parsing

Reply
Thread Tools

Help with SAX parsing

 
 
uestebanez@confluencia.net
Guest
Posts: n/a
 
      08-29-2005
Hi everybody!
I have a little problem working with libxml SAX API.
The problem is that I don't know how to stop parsing when I have
processed the data I need. I don't want to parse all file, I only need
read until I reach certain part of the xml and then stop parsing.
Does anybody know how to stop?

Another question is, Is necessary free any memory when I am using SAX
API?
I only call to "xmlSAXUserParseFile" and then callbacks "call me" so I
store the values in my own data structures and I never release
"nothing". Is this right?

Thanks to all.

PS: I would be very nice if some of you can tell me a good SAX API
tutorial.

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-29-2005


http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> I have a little problem working with libxml SAX API.
> The problem is that I don't know how to stop parsing when I have
> processed the data I need. I don't want to parse all file, I only need
> read until I reach certain part of the xml and then stop parsing.
> Does anybody know how to stop?


I don't know about libxml and C but with SAX2 in Java your handlers need
to throw an error to force the parser to abort parsing.

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
uestebanez@confluencia.net
Guest
Posts: n/a
 
      08-29-2005
Thanks Martin,
But I'm afraid that exceptions doesn't exists in C (not C++) and this
is the languague tha I'm using.
Regards,
Unai

 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      08-29-2005


(E-Mail Removed) wrote:

> But I'm afraid that exceptions doesn't exists in C (not C++) and this
> is the languague tha I'm using.


Right, maybe there is a way with that libxml SAX API and C to have the
handler indicate an error but I can't help with that stuff. You could
try the mailing list
<http://mail.gnome.org/mailman/listinfo/xml>
for libxml.

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
plz help me in xml parsing with SAX(j2me) amarkinkiri@gmail.com Java 5 01-12-2009 01:31 PM
Java sax UTF-8 parsing troubles -- PLEASE HELP... Aleksandar Matijaca XML 5 09-01-2004 01:30 PM
SAX Parsing - Weird results when parsing content between tags. Naren XML 0 05-11-2004 07:25 PM
Problem parsing XML with SAX in WSAD - Please help! Jonathan XML 0 10-28-2003 01:59 PM



Advertisments