dgywft Posted January 1, 2011 Share Posted January 1, 2011 I am having troubles loading an xml file, without it just out displaying all the information right away into my php document. Example, i have a php file that runs a command line call to generate some xml, the file name on the server is like fontxml.php (header set to xml though), and its output is like this (when viewing the page source): <?xml version="1.0" encoding="UTF-8" ?> <report> <fonts> <font> <commonName>Arial</commonName> <nativeName>Arial</nativeName> <fixedWidth>no</fixedWidth> <fixedSizes>no</fixedSizes> <copyright>Copyright © 2010 by Apple.</copyright> </font> </fonts> </report> My problem is, I want to display just the "commonName" value into a certain page design. When I do an include, the entire xml data is just opened into my document right away. I have tried loading with simplexml methods, nothing works. Any ideas on this? Quote Link to comment https://forums.phpfreaks.com/topic/223113-xml-data-parse/ Share on other sites More sharing options...
RichardRotterdam Posted January 1, 2011 Share Posted January 1, 2011 . I have tried loading with simplexml methods, nothing works. Any ideas on this? Show what it is you tried and paste the code. Quote Link to comment https://forums.phpfreaks.com/topic/223113-xml-data-parse/#findComment-1153506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.