You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Radu Preotiuc-Pietro <ra...@oracle.com> on 2008/10/01 04:48:41 UTC

RE: Handling references with XMLBeans

Hi Jacek,

XMLBeans does not give xmi:id/xmi:idref any special meaning. You would need to use, say, an XmlCursor to quickly go over the document and build an ID table yourself.

Radu

> -----Original Message-----
> From: Jacek Cala [mailto:jcala@agh.edu.pl] 
> Sent: Friday, September 26, 2008 9:08 AM
> To: user@xmlbeans.apache.org
> Subject: Handling references with XMLBeans
> 
> Hello,
> 
> I'm new to the Apache XMLBeans and have a question about 
> references in an XML files.
> Does XMLBeans 2.4 allow handling hrefs and xmi:idref in XML 
> files based on a previously compiled schema? I cannot find 
> any information about that.
> 
> I have problem with the following example:
> _________________________________
> ...
> 
> <Node xmi:id="n1">
>    <name>node 1</name>
>    ...
> </Node>
> ...
> 
> <Group>
>    <Node xmi:idref="n1" />
>    <Node href="n2.xml" />
> </Group>
> ...
> _________________________________
> 
> Whenever I go through nodes using Group.getElementArray(), I 
> get null names. What is the simplest method to access n1 and 
> n2 in this case?
> 
> Any hints appreciated,
> Jacek
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org