PHP XML Parser (ext.)

Source: Internet
Author: User
Tags xml parser
PHP Processing XML files

One
Read, update (create or manipulate) an XML document that requires an XML parser

。 There are two types of XML parsers:

1. tree-based parser:
Convert an XML document into a DOM tree structure
Dom Parser in PHP
See details
Http://www.w3schools.com/php/php_xml_dom.asp

2. Event-based parser:
Reads an XML document and then considers the contents of the XML as events, and a particular function is called when a specific event occurs
PHP for Expat parser
See details
Http://www.w3schools.com/php/php_xml_parser_expat.asp
and http://www.w3schools.com/php/php_ref_xml.asp

Faster than tree-based parser.


Second, PHP can be used in other classes to access the XML file library also has
SimpleXML Functions
Http://www.w3schools.com/php/php_ref_simplexml.asp

PHP Libxml Functions
Http://www.w3schools.com/php/php_ref_libxml.asp


Select the most appropriate XML parser to read and parse the XML document according to the actual situation.

Turn

http://blog.csdn.net/omohe/article/details/1924643
  • 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.