xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monica Granbois" <mgranb...@abebooks.com>
Subject changing the schemaLocation
Date Thu, 15 Jul 2004 02:35:17 GMT
Hi,

I have an xml document which I have parsed into my XmlObject.  I want to
change the schemaLocation that is reference by the xml.  Is there a way to do
this?

For example if the xml had a schema location of original.xsd as below:

<xs:Foo xs:id="123" xs:deletestatus="false" xs:typecode="1"
xsi:schemaLocation="http://www.foobar.com/XMLSchema
http://www.foobar.com/docs/Schemas/original.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.foobar.com/XMLSchema">

Is it possible to change the schemaLocation to be 'TheNewSchema.xsd' as shown
below:

<xs:Foo xs:id="123" xs:deletestatus="false" xs:typecode="1"
xsi:schemaLocation="http://www.foobar.com/XMLSchema
http://www.foobar.com/docs/Schemas/TheNewSchema.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.foobar.com/XMLSchema">


I'm assuming I will need to use an XmlCursor, but I'm not sure if should use
the execQuery() method to attempt this or not. Any pointers in which
direction I should be looking would be appreciated.

Thanks,

Monica


- ---------------------------------------------------------------------
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