how to read an xml file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saumya
Forum Contributor
Posts: 193
Joined: Sun Jan 30, 2005 10:21 pm

how to read an xml file?

Post by saumya »

how can i read an xml file? Is it possible to go through all the nodes and node values through Php? If yes, please tell the way to go. I have an xml file and i want ccertain data from that file to be echoed or printed on an web page.How can i do that?
thanks
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

PHP 5 is better with XML then 4.

Here is a good article to convert XML to a PHP Array:

http://www.devarticles.com/c/a/PHP/Conv ... ructure/7/
saumya
Forum Contributor
Posts: 193
Joined: Sun Jan 30, 2005 10:21 pm

Post by saumya »

thanks.
Actually i am using php 5.
Let me go through the article and i will get back to you.
thanks
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

very easy with php 5
http://php.net/simple_xml
saumya
Forum Contributor
Posts: 193
Joined: Sun Jan 30, 2005 10:21 pm

Post by saumya »

thank you very much.I will go through it and tell you.
thanks
Post Reply