xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Vasilik" <eric...@bea.com>
Subject RE: Retaining XmlCursor on a newly ceated/added XmlObject
Date Tue, 27 Jul 2004 16:48:07 GMT
When you move the row, the cursor stays behind, in the document which
contained the row.  This is by design.  If you have the XmlObject of the
row, you can acquire a new cursor on it by calling XmlObject.newCursor.
Will this work for you?  Could you provide a more concise example?

-----Original Message-----
From: Saha, Sanjeev [mailto:SSaha@asce.org] 
Sent: Tuesday, July 27, 2004 8:13 AM
To: xmlbeans-user@xml.apache.org
Subject: Retaining XmlCursor on a newly ceated/added XmlObject

For the sample xml:

<ResultSet>
  <Row>
    <Column1/>
    <Column2/>
  </Row>
  <Row>so on and so forth
  </Row>  
</ResultSet>

The <Row> is processed by a separate api and returned as an XmlObject.
After the <Row> is returned, it is added to the <ResultSet> for further
processing. Since the <Rows> have the same 'Name' it becomes difficult
to process the most recently returned <Row>.

Is there a way to retain the XmlCursor of the <Row/> that is returned so
that after it is added to the <ResultSet> processing on the same can be
continued?

The api that deals with the <ResultSet> creates the <Row> XmlObject and
passes it on for processing. Which is to say that it knows what object
was worked upon including the XmlCursor on the <Row>, however, I lose
this reference as soon as I add it to the <ResultSet> object :o(

I've tried fromCursor.copyXml(toCursor), but it still points to the
independently created <Row> object and not the <Row> embedded in the
<ResultSet>. 

Thanks in advance,
Sanjeev

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message