ArticleDirectory
Definition and usage
The _ construct () function creates a new simplexmlelement object.
If yes, the function returns an object. If it fails, false is returned.
Syntax
_ Construct (data, options, is_url, NS, is_prefix)
Parameters |
Description |
Data |
Required. The path or URL of an XML string or XML document. |
Options |
Optional. Specifies the additional libxml parameter. |
Is_url |
Optional. Specifies whether the data parameter is a URL. The default value is false. |
NS |
Optional. |
Is_prefix |
Optional. |
Return Value
Returns a simplexmlelement object that represents data.
Example
<? PHP $ xmlstring = <XML <? XML version = "1.0" encoding = "ISO-8859-1"?> <Note> <to> George </to> <from> JOHN </from> Simplexmlelement ($ xmlstring); Echo $ XML-> body [0];?>
The output is similar:
Don't forget the meeting!
Later, we can see that the front _ of construct is one. I rely on it. This is also the last error. I forgot, but now I remember it.
Function _ construct ()
{}
No
Function _ construct ()
{}