Sponsored By
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Article
Forum
Blog
Quiz
Beginner
Careers
Contact
Login
Email Id
Password
Remember Me
Forgot Password?
Sign Up
Home
|
Product
|
Services
|
About Us
|
Interview
|
DeveloperSection
|
Submit an Article
|
Submit Blog
Report Abuse Form
Reason:
Home
>>
Other Programming
>>
PHP
>>
How to read xml file in PHP
Author
Post
Manoj Bhatt
Total Post:
19
Member Since:
9/29/2011
Points:
97
How to read xml file in PHP
Posted On:
11/30/2011 1:33:08 AM
Report Abuse
Hi Everyone,
Can anyone tell me, how to read xml file in php?
Thanks in advance!
Reply
Author
Post
Arun Singh
Total Post:
48
Member Since:
7/1/2011
Points:
331
Re: How to read xml file in PHP
Posted On:
12/1/2011 6:41:54 AM
Report Abuse
Hi Manoj Bhatt,
To read XML file in PHP, you can use the following code:
// Create DOMDocument object
$xmlDoc = new DOMDocument();
// load XML file
$xmlDoc->load("YourFile.xml");
$ptag = $xmlDoc->getElementsByTagName('ParentNode');
$childQType=$ptag->item($i)->getElementsByTagName('ChildNode');
echo $childQType->item(0)->childNodes->item(0)->nodeValue;
So in the same manner you can get all nodes values.
Modified On:
12/1/2011 6:49:25 AM
Reply
Report Abuse Form
Reason:
Total Online Users:
5772
Advertisement
Advertise with Us
Copyright ©
2013
MindStick. All Rights Reserved.
Home
|
Contact Us
|
Services
|
Feedback
|
Advertisement
|
Privacy Policy
|
Term & Conditions
|
About Us