Web Design and Development Forums

xml parsing

This is a discussion on "xml parsing" within the PHP Forum section. This forum, and the thread "xml parsing are both part of the Program Your Website category.

Old Apr 12th, 2008, 12:28   #1 (permalink)
Up'n'Coming Member
 
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 59
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?
ktsirig is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 12th, 2008, 16:05   #2 (permalink)
Moderator
 
Join Date: Feb 2007
Location: United States
Age: 14
Posts: 127
Send a message via MSN to Weird1993 Send a message via Skype™ to Weird1993
Re: xml parsing

First off your xml doesn't match up... There's no <Article> to go with the closing </Aticle> you have. After that... Here is a good article that explains SimpleXML.
__________________
Daniel Thompson
http://danielwthompson.com
Weird1993 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catch XML parsing Exceptions. alexgeek PHP Forum 0 Jan 5th, 2008 10:53
XML Parsing Error: Opening ending tag mismatch bobby198010 Accessibility and Usability 11 Oct 20th, 2007 09:07
Parsing text Donny Bahama PHP Forum 6 Jun 1st, 2006 07:25
Cross-browser XML parsing??? gohankid77 XML, RSS & Atom 4 Mar 28th, 2005 17:39



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 10:52.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59