Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Reading Xml Data, Within PHP
Mordent
post Jul 25 2008, 05:38 PM
Post #1


Premium Member
Group Icon

Group: [HOSTED]
Posts: 259
Joined: 30-June 07
From: UK
Member No.: 23,045
myCENTs:9.80



So I was idly pondering my next PHP venture today - more on that if/when I get it done - when I realised I needed to be able to read some data in from files. Sure, I could use simple binary files (each line having the relevant data on it, etc. etc.), but I figured I'd might as well learn how to use this snazzy XML stuff I keep hearing about.

So, after looking at W3Schools for a bit I couldn't find an obvious way of reading XML files in PHP. There was plenty of information of how to do it in JavaScript, but as I want to read the files in on the server rather than with the client's browser that's not much help. After searching on php.net I realised there was way more XML related stuff than I was ready for, so quite simply I'd like to know if it's possible to read XML files in using PHP (and specifically: on AstaHost), how I go about it and any other little snippets of information you have on XML and PHP.

Thanks in advance!

Mordent
Go to the top of the page
 
+Quote Post
toby
post Jul 25 2008, 06:12 PM
Post #2


Super Member
Group Icon

Group: Members
Posts: 555
Joined: 29-September 06
Member No.: 16,228



There's millions of classes for this. Personally, I'd make my own, but I think this is the biggest one. http://uk3.php.net/simplexml
Go to the top of the page
 
+Quote Post
Mordent
post Jul 25 2008, 07:03 PM
Post #3


Premium Member
Group Icon

Group: [HOSTED]
Posts: 259
Joined: 30-June 07
From: UK
Member No.: 23,045
myCENTs:9.80



Ah, perfect. Got to love how it's called SimpleXML, although damned if I spotted that when trawling through search results. wink.gif

Cheers!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php, Sql Lite: Storing Session's Data?(1)
  2. Displaying Data From Mysql?(2)
  3. Php/mysql Data Display(3)
  4. Possible To Do?(7)
  5. [PHP + MySQL] Encrypting Data(11)
  6. Sessions, Setting, Unsetting, Reading(5)
  7. Reading Data From Sessions(2)
  8. Storing Data Into Xml With A Php Form(2)
  9. Need An Alternative To $http_post_data For PHP4(5)
  10. Data Passing - Re An Assignment For School - Please Help :)(8)
  11. Send XML Data To PHP Page(0)
  12. Proper Way To Grab User Data?(1)
  13. Retrieving Data And Displaying In Boxes(6)
  14. Sql Injection Prevention (passing Numerical Data Across Pages).(9)
  15. Getting Certain Parts Of A Record(17)
  1. Reading Files And Folders(1)
  2. Letting Users Add Mysql Data With Php(1)


 



- Lo-Fi Version Time is now: 5th December 2008 - 11:39 AM