Thread: xml parsing
View Single Post
  #1 (permalink)  
Old Apr 12th, 2008, 12:28
ktsirig ktsirig is offline
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
xml parsing

Hello all, I need to parse some xml documents. I use Simple:XML and it works ok up to the point of matching elements that occur just once in my documents. How can I process something like:

Code: Select all
<PubmedArticle>
         <AuthorList CompleteYN="Y">
                <Author ValidYN="Y">
                    <LastName>Wilde</LastName>
                    <ForeName>A</ForeName>
                    <Initials>A</Initials>
                </Author>
                <Author ValidYN="Y">
                    <LastName>Reaves</LastName>
                    <ForeName>B</ForeName>
                    <Initials>B</Initials>
                </Author>
                <Author ValidYN="Y">
                    <LastName>Banting</LastName>
                    <ForeName>G</ForeName>
                    <Initials>G</Initials>
                </Author>
            </AuthorList>
         </Article>
</PubmedArticle>
and print all Authors' names?
Reply With Quote