PHP XML Parser Functions | XML Parse Extensions āĀ XML parse Extensions are works based on libxml. The following xml parsers are available in the php core.
Simple XML parser
DO XML parser
XML parser
XML Reader
Simple XML parser
The Simple XML parser also called as tree based XML parser and it will parse the simple XML file. Simple XML parse will call simplexml_load_file() method to get access to the xml from specific path.
DOM parser
DOM Parser also called as a complex node parser, Which is used to parse highly complex XML file. It is used as interface to modify the XML file. DOM parser has encoded with UTF-8 character encoding.
XML parse
XML parsing is based on SAX parse. It is more faster the all above parsers. It will create the XML file and parse the XML. XML parser has encoded by ISO-8859-1, US-ASCII and UTF-8 character encoding.
XML Reader
XML Reader parse also called as Pull XML parse. It is used to read the XML file in a faster way. It works with high complex XML document with XML Validation.
PHP XML Parser Functions
utf8_decode()
Decodes an UTF-8 string to ISO-8859-1
utf8_encode()
Encodes an ISO-8859-1 string to UTF-8
xml_error_string()
Returns an error string from the XML parser
xml_get_current_byte_index()
Returns the current byte index from the XML parser
xml_get_current_column_number()
Returns the current column number from the XML parser
xml_get_current_line_number()
Returns the current line number from the XML parser
xml_get_error_code()
Returns an error code from the XML parser
xml_parse()
Parses an XML document
xml_parse_into_struct()
Parses XML data into an array
xml_parser_create_ns()
Creates an XML parser with namespace support
xml_parser_create()
Creates an XML parser
xml_parser_free()
Frees an XML parser
Ā
Ā
Thanks You ā https://phpforever.com/
The post PHP XML Parser Functions | XML Parse Extensions appeared first on PHPFOREVER.