Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Store value of an xml element from many xml into an array

    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

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    do you have specific programming language in mind?
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    Regular Coder byuhobbes85's Avatar
    Join Date
    Oct 2006
    Location
    Ames, Iowa, USA
    Posts
    116
    Thanks
    9
    Thanked 4 Times in 4 Posts
    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. 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.
    -- </byuhobbes>

  • #4
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My preferred programming language is C++ but it seems to be quite complicated...

  • #5
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by pam82 View Post
    My preferred programming language is C++ but it seems to be quite complicated...
    http://libxmlplusplus.sourceforge.net/

    regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •