PHP uses XmlReader to read XML data samples, Xmlreaderxml
There is an XML file with the following content:
Copy the Code code as follows:
Simpsons
FOX
8:00AM-5:00pm
We are using
The code examples for PHP XmlReader are as follows:
? PHP
Header ("content-type:text/html; Charset=utf-8 ");
$ URL = "http://www.google.com/Ig/api?weather=shenzhen ";
Loading XML content
$ XML = New XMLReader ();
1. DOM functions
A, Domdocument->load ()
Role: Loading an XML file
Usage: domdocument->load (string filename)
Parameters: Filename,xml file;
Returns: TRUE if successful, or FALSE if unsuccessful.
B, Domdocument->loadxml ()
Role: Loading XML
Set of common phpxml functions (more detailed ). 1. Functions of DOM a and DOMDocument-load (): loads xml files. usage: DOMDocument-load (stringfilename) parameter: filename, xml file; return: TRUE if successful, error
1. DOM functions
A.
What is PHP?
PHP ("Php:hypertext preprocessor", the acronym for Hypertext Preprocessor) is a widely used, open-source, multipurpose scripting language that can be embedded in HTML, especially for Web development.The above is a simple answer, but
PHP generates and obtains XML format data. php obtains xml format. PHP generates and obtains XML format data. php obtains xml format. This document describes how PHP generates and obtains XML format data. For your reference, refer to: how to
What is PHP? PHP ("Php:hypertext preprocessor", the acronym for Hypertext Preprocessor) is a widely used, open-source, multipurpose scripting language that can be embedded in HTML, especially for Web development.The above is a simple answer, but
This article illustrates how PHP generates and obtains XML-formatted data. Share to everyone for your reference, specific as follows:
When doing data interfaces, we typically get Third-party data interfaces or provide data interfaces to third
What can PHP do ?. PHP can do anything. PHP is mainly used for script programs on the server. Therefore, PHP can be used to complete the work that can be done by any other CGI program, such as collecting form data and generating dynamic PHP to do
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.