XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 14th, 2001, 11:11 AM
Pokeboy Pokeboy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 3 Pokeboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Parsing XML

Hi, i'm using the PHP code form melonfire at :
URL

My question is :
So far, my xml code has been in the form like
1)
<title>The Hobbit</title>
<Pages>359</pages>

and everything seems fine.

But i'm wondering if its also possible to have the xml code like
2)
<title="The Hobbit" Pages="359" />

Would it be possible to parse XML with php when the XML code is like the second example??if so what would I have to change in the PHP code?


thanx

Reply With Quote
  #2  
Old November 15th, 2001, 08:43 PM
dabean dabean is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 15 dabean User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<title="The Hobbit" Pages="359" />

wouldn't/shouldn't be valid, but say
<book title="The Hobbit" Pages="359" />
would. As for using this method is php search the docs for whatever xml parser your using for "attributes". Which is what they are.

e.g. http://www.devshed.com/Server_Side/...PHP2/page4.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Parsing XML

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap