简体   繁体   中英

how to echo xml file in php by using simpleXML?

<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>George</to>
<from>John</from>
<heading>Reminder</heading>
<body>Don't forget the meeting!</body>
</note>

how to use php to echo xml information

First you need to get your XML File. Then just echo what you want. Example:

$file = file_get_contents('http://example.com/rss');
echo $file;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM