SimpleXML
   HOME

TheInfoList



OR:

SimpleXML is a
PHP PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. ...
extension that allows users to easily manipulate/use
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
data. It was introduced in PHP 5 as an
object oriented Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
approach to the XML DOM providing an object that can be processed with normal property selectors and array iterators. It represents an easy way of getting an element's attributes and textual content if you know the XML document's structure or layout. Compared to DOM or the
Expat An expatriate (often shortened to expat) is a person who resides outside their native country. The term often refers to a professional, skilled worker, or student from an affluent country. However, it may also refer to retirees, artists and ...
parser, SimpleXML takes a fewer lines of code to read text data from an element.


Functions

* addAttribute() * addChild() * asXML() * attributes() * children() * __construct() * getDocNamespaces() * getName() * getNamespaces() * registerXPathNamespace() * xpath() * simplexml_import_dom * simplexml_load_file * simplexml_load_string


Error handling

It is possible to suppress all XML errors when loading the document and then iterate over the errors.


References


External links


PHP.net's SimpleXML manual

AIP Conf. Proc. 1497, pp. 395-401; Speed up of XML parsers with PHP language implementation

devshed SimpleXML Tutorial
PHP software XML parsers {{compu-lang-stub