Dom XML function _php Tutorial in PHP

Source: Internet
Author: User
DOM XML functions
These functions is only available if PHP is configured with--with-dom=[dir], using the GNOME XML library. You'll need at least libxml-2.0.0 (the beta version won't work). These functions has been added in PHP4.

This module defines the following constants:

Table 1. XML Constants

Constant Value Description
Xml_element_node 1
Xml_attribute_node 2
Xml_text_node 3
Xml_cdata_section_node 4
Xml_entity_ref_node 5
Xml_entity_node 6
Xml_pi_node 7
Xml_comment_node 8
Xml_document_node 9
Xml_document_type_node 10
Xml_document_frag_node 11
Xml_notation_node 12
Xml_global_namespace 1
Xml_local_namespace 2

This module defines a number of classes. The DOM XML functions return a parsed tree of the XML document with each node being an object belonging to one of the these CL Asses.

XmlDoc
(PHP4 >= 4.0b4)

XmlDoc--Creates a DOM object of an XML document
Description

Object XmlDoc (String str)


The function parses the XML document in STR and returns a object of class "Dom document", having the properties "Doc" (re SOURCE), "version" (String) and "type" (long).

Xmldocfile
(PHP4 >= 4.0b4)

Xmldocfile--Creates a DOM object from XML file
Description

Object Xmldocfile (String filename)


The function parses the XML document in the file named filename and returns a object of class "Dom document", having the Properties "Doc" (Resource), "version" (String).

Xmltree
(PHP4 >= 4.0b4)

Xmltree--Creates a tree of PHP objects from XML document
Description

Object Xmltree (String str)


The function parses the XML document in STR and returns a tree PHP objects as the parsed document.



http://www.bkjia.com/PHPjc/532475.html www.bkjia.com true http://www.bkjia.com/PHPjc/532475.html techarticle DOM XML Functions These functions is only available if PHP is configured with--with-dom=[dir], using the GNOME XML Library. You'll need at least libxml-2.0.0 (the beta version ...

  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.