build a hierarchical tree, without using DOM,schema, and sax using expat parser and c

P

pharioum

I've been experimenting with the jclark's expat parser. I compiled it
on
linux, and it works just great. However, finding tags and data by
implementing the callback functions in c language is cumbersome.
Has anybody written code that uses the expat callback's in such a way
as to
build a hierarchical tree, without using DOM,schema, and sax, that can
be traversed.My purpose, just enough to traverse branches and find
leafs of a xml documents without using DOM, schema, and sax, and i
also want help regarding how to convert a xml document to a
hierachical tree which contains tags values. thanks
 
P

Pavel Lepin

I've been experimenting with the jclark's expat parser. I
compiled it on
linux, and it works just great. However, finding tags and
data by implementing the callback functions in c language
is cumbersome. Has anybody written code that uses the
expat callback's in such a way as to
build a hierarchical tree, without using DOM,schema, and
sax, that can be traversed.

You know, changing your From header from
<[email protected]> to <[email protected]> and
reposting the same question in a different wording for the
fifth time in a week is a Bad Idea, because it Annoys
Regulars, and is Not Working Anyway. You've already been
told to Do Your Own Homework. Yet another clueless droid
with a degree is the last thing this industry needs.

<http://www.catb.org/~esr/faqs/smart-questions.html>
 
J

Joseph Kesselman

build a hierarchical tree, without using DOM,schema, and sax

The usual approach is to use the SAX output as input to your
tree-structure builder. If you really insist on bypassing SAX, you're
out of the domain of standard APIs and into mucking with the internals
of the parser, which is never a good thing to do unless you have very
specific requirements that the standards can't handle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top