You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by "Tan, Leong T" <lt...@essex.ac.uk> on 2004/03/25 18:16:28 UTC

How to use xupdate to update a a specific xml file inside a collection?

Hi,

I got the following problem:

I got a collection named cc432 inside:  /db/cc432

Then inside cc432 collection, I got five xml files.
There are as follows:

1) 2001Exam
2) 2002Exam
3) 2003Exam
4) 2004Exam
5) 2005Exam

The 2001Exam xml file contains the following:

<exam>
<section id="A">
<question no="1" value="20">
   <text>What is the largest planet in the solar system></text>
</question>
</section>
</exam>


I need to go inside 2001Exam xml file inside cc432 collection and change
the following:
Change "<question no="1" value="20">" to "<question no="1" value="70">"

How do I specify the xupdate query and how to I specify the xml file
"2001Exam"?

Please advice and give me the sample codes.

Thanks.

Regards,
longtai