Re: Cross-referencing support

"Lee Passey" <[email protected]> Tue, 20 Sep 2011 08:51:27 -0600 (MDT)
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
On Tue, September 20, 2011 1:01 am, anirudh nair wrote:

<!-- snip -->

> Does, Expat provide such a functionality?

No; Expat is an XML parser only, not a DOM builder. When Expat calls your
"start element" callback for '<student Index="0">' it has already forgotten
all about '<data:class id="ENGL6004">'.

You /can/ use Expat as the parser portion of a larger application that builds
a DOM tree (I frequently use Expat in conjunction with DOMCAPI
[http://sourceforge.net/projects/domcapi/] to build DOM trees which I can then
query and manipulate) but it is up to you to build whatever internal data
structures you need to capture the XML data that Expat parses. Having built
your own internal data structures, you can then, of course, present them any
way you like.

Cheers,
Lee