...

View Full Version : Store value of an xml element from many xml into an array



pam82
11-28-2008, 02:51 PM
Hello,

I'm a newbie in xml and i would appreciate any help regarding the following:

I have several xml files stored in a directory and i would like to get a certain value from the xml files and store them in an array.

The xml are as follows:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<Mpeg7 xmlns="http://www.mpeg7.org/2001/MPEG-7_Schema" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
<DescriptionUnit xsi:type="DescriptorCollectionType">
<Descriptor xsi:type="MotionActivity">
<Intensity>3</Intensity>
<DominantDirection>0</DominantDirection>
</Descriptor>
</DescriptionUnit>
</Mpeg7>

And i would like to get the value of the "Intensity" which is 3 (from many xmls) and store it in an array.

Is there any easy way to do this?

Thank you

shyam
11-28-2008, 03:23 PM
do you have specific programming language in mind?

byuhobbes85
11-29-2008, 09:16 PM
Yeah, this is not really a question about XML but about specific programming implementations. For example, PHP provides a very nice built-in XML parser (http://us.php.net/simple_xml). If you had questions about using this (or how to parse XML in other languages), you will want to post those questions in the appropriate forums.

pam82
12-01-2008, 12:29 PM
My preferred programming language is C++ but it seems to be quite complicated...

oesxyl
12-01-2008, 11:04 PM
My preferred programming language is C++ but it seems to be quite complicated...

http://libxmlplusplus.sourceforge.net/

regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum