N
Newbie
Hi,
I am just starting to learn to use XML, so this is a really basic question.
I have managed to write my XML document to disk, and now want to read it
back, and get the values from the XML file. My XML file is at the bottom. I
am assuming that its correct (but I could be wrong)
What I want to be able to do is just get parts of the xml document, for
example I only want to get the fields for the content type 'sample1' (the
below sample has just one contenttype, normally it would have hundreds) I
would also then want to get the choices for where they exisit for fields.
Whilst I am sure the answer is straight forward, I have not found an answer
that i can understand easily.
Any tips would be great.
<?xml version="1.0"?>
<!--Created on 7/30/2008 9:31:54 PM-->
<libraries>
<library id="97199410">
<name>Service Documents</name>
<ContentType>
<name>Sample1</name>
<Field>
<name>Content Type</name>
<Choices>
<name>Document</name>
</Choices>
<Choices>
<name>Folder</name>
</Choices>
<Choices>
<name>Heath</name>
</Choices>
</Field>
<Field>
<name>Name</name>
</Field>
<Field>
<name>Title</name>
</Field>
<Field>
<name>Document Modified By</name>
</Field>
<Field>
<name>Document Created By</name>
</Field>
<Field>
<name>ABN</name>
</Field>
<Field>
<name>Legal Name</name>
</Field>
<Field>
<name>Option List</name>
<Choices>
<name>Selection 1</name>
</Choices>
<Choices>
<name>Selection 2</name>
</Choices>
<Choices>
<name>Selection 3</name>
</Choices>
<Choices>
<name>Selection 4</name>
</Choices>
</Field>
<Field>
<name>DropDown Metadata Col</name>
<Choices>
<name>Choice1</name>
</Choices>
<Choices>
<name>Choice2</name>
</Choices>
<Choices>
<name>Choice3</name>
</Choices>
</Field>
</ContentType>
</library>
</libraries>
I am just starting to learn to use XML, so this is a really basic question.
I have managed to write my XML document to disk, and now want to read it
back, and get the values from the XML file. My XML file is at the bottom. I
am assuming that its correct (but I could be wrong)
What I want to be able to do is just get parts of the xml document, for
example I only want to get the fields for the content type 'sample1' (the
below sample has just one contenttype, normally it would have hundreds) I
would also then want to get the choices for where they exisit for fields.
Whilst I am sure the answer is straight forward, I have not found an answer
that i can understand easily.
Any tips would be great.
<?xml version="1.0"?>
<!--Created on 7/30/2008 9:31:54 PM-->
<libraries>
<library id="97199410">
<name>Service Documents</name>
<ContentType>
<name>Sample1</name>
<Field>
<name>Content Type</name>
<Choices>
<name>Document</name>
</Choices>
<Choices>
<name>Folder</name>
</Choices>
<Choices>
<name>Heath</name>
</Choices>
</Field>
<Field>
<name>Name</name>
</Field>
<Field>
<name>Title</name>
</Field>
<Field>
<name>Document Modified By</name>
</Field>
<Field>
<name>Document Created By</name>
</Field>
<Field>
<name>ABN</name>
</Field>
<Field>
<name>Legal Name</name>
</Field>
<Field>
<name>Option List</name>
<Choices>
<name>Selection 1</name>
</Choices>
<Choices>
<name>Selection 2</name>
</Choices>
<Choices>
<name>Selection 3</name>
</Choices>
<Choices>
<name>Selection 4</name>
</Choices>
</Field>
<Field>
<name>DropDown Metadata Col</name>
<Choices>
<name>Choice1</name>
</Choices>
<Choices>
<name>Choice2</name>
</Choices>
<Choices>
<name>Choice3</name>
</Choices>
</Field>
</ContentType>
</library>
</libraries>