xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anirudh nair <anirudh.an...@gmail.com>
Subject Cross referencing support
Date Tue, 20 Sep 2011 11:10:40 GMT
Hi all,

I have a requirement of reading and writing XML that is highly
cross-referenced(within the same XML). So, does Xerces support cross
referencing.Basically, I want the below explained functionality.

<classes>
    <data:class id="ENGL6004">
      <title>From Here to Eternity: Studies in the Future
        and other Temporal Genres</title>
      <Teacher>Margaret Doornan</Teacher>
    </data:class>
    <data:class id="HIST6010">
      <title>The You Decade: A History of Finger Pointing
        in Post-War America</title>
      <Teacher>Kelly Griftman</Teacher>
     </data:class>
    <data:class id="ENGL6020">
      <title>Reading between the Lines: The Literature
        of Waiting</title>
      <Teacher>Norbert James</Teacher>
    </data:class>
 </classes>

<students>
    <student Index="0">
      <name>Kelly Griftman</name>
      <year>Senior</year>
      <status>full-time</status>
      <ref:class ref="HIST6010"/>
      <ref:class ref="ENGL6020"/>
    <student>
    <student Index="1">
      <name>Norbert James</name>
      <year>Senior</year>
      <status>full-time</status>
      <ref:class ref="ENGL6004"/>
      <ref:class ref="ENGL6020"/>
    <student>
</students>


So, now if I fetch the node student with Index==1, the node should look like

<student Index="1">
      <name>Norbert James</name>
      <year>Senior</year>
      <status>full-time</status>
      <class id="ENGL6004">
       <title>From Here to Eternity: Studies in the Future
        and other Temporal Genres</title>
       <Teacher>Margaret Doornan</Teacher>
      </class>
      <class id="ENGL6020">
       <title>Reading between the Lines: The Literature
        of Waiting</title>
       <Teacher>Norbert James</Teacher>
      </class>
<student>

Does, Xerces provide such a functionality?

P.S: My understanding about XML and XML parsing is very naive.

Thanks
Anirudh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message