Complete PHP XML Reference
The xml_set_element_handler() function specifies functions to be called at the start and end of an element in the XML document.
This function returns TRUE on success, or FALSE on failure.
| Parameter | Description |
|---|---|
| parser | Required. Specifies XML parser to use |
| start | Required. Specifies a function to be called at the start of an element |
| end | Required. Specifies a function to be called at the end of an element |
The Function specified by the "start" parameter must have three parameters:
| Parameter | Description |
|---|---|
| parser | Required. Specifies a variable containing the XML parser calling the handler |
| name | Required. Specifies a variable containing the name of the elements, that triggers this function, from the XML file as a string |
| data | Required. Specifies an array containing the elements attributes from the XML file as a string |
The Function specified by the "end" parameter must have two parameters:
| Parameter | Description |
|---|---|
| parser | Required. Specifies a variable containing the XML parser calling the handler |
| name | Required. Specifies a variable containing the name of the elements, that triggers this function, from the XML file as a string |
Note: The start and end parameters can also be an array containing an object reference and a method name.
The output of the code above will be:
Complete PHP XML Reference
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|