[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-users
Subject:    Cross referencing support
From:       anirudh nair <anirudh.anu01 () gmail ! com>
Date:       2011-09-20 11:22:40
Message-ID: CAEKYpER12ODW0YQem68HYSPsjMSVL8R0qWXt7jzJLkR_vs6hyA () mail ! gmail ! com
[Download RAW message or body]


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic