Jump to content

xml parse


ktsirig

Recommended Posts

 

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:

 

<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?

Link to comment
https://forums.phpfreaks.com/topic/100793-xml-parse/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.