php에 xml을 파싱하기 위한 파서/API로
php 컴파일 시 --enable-simplexml 옵션을 주어야 사용이 가능한 라이브러리이다.
꽤 가볍고 DOM / SAX를 둘다 지원해서 php에서 어플리케이션과 통신하여 데이터를 주고 받는 용도로
많이들 사용되는 듯 하다.
- SimpleXMLElement — The SimpleXMLElement class
- SimpleXMLElement::addAttribute — Adds an attribute to the SimpleXML element
- SimpleXMLElement::addChild — Adds a child element to the XML node
- SimpleXMLElement::asXML — Return a well-formed XML string based on SimpleXML element
- SimpleXMLElement::attributes — Identifies an element's attributes
- SimpleXMLElement::children — Finds children of given node
- SimpleXMLElement::__construct — Creates a new SimpleXMLElement object
- SimpleXMLElement::count — Counts the children of an element
- SimpleXMLElement::getDocNamespaces — Returns namespaces declared in document
- SimpleXMLElement::getName — Gets the name of the XML element
- SimpleXMLElement::getNamespaces — Returns namespaces used in document
- SimpleXMLElement::registerXPathNamespace — Creates a prefix/ns context for the next XPath query
- SimpleXMLElement::saveXML — Alias of SimpleXMLElement::asXML
- SimpleXMLElement::__toString — Returns the string content
- SimpleXMLElement::xpath — Runs XPath query on XML data
- SimpleXMLIterator — The SimpleXMLIterator class
- SimpleXMLIterator::current — Returns the current element
- SimpleXMLIterator::getChildren — Returns the sub-elements of the current element
- SimpleXMLIterator::hasChildren — Checks whether the current element has sub elements.
- SimpleXMLIterator::key — Return current key
- SimpleXMLIterator::next — Move to next element
- SimpleXMLIterator::rewind — Rewind to the first element
- SimpleXMLIterator::valid — Check whether the current element is valid
- SimpleXML Functions
- simplexml_import_dom — Get a SimpleXMLElement object from a DOM node.
- simplexml_load_file — Interprets an XML file into an object
- simplexml_load_string — Interprets a string of XML into an object
[링크 : http://php.net/manual/en/book.simplexml.php]
[링크 : http://php.net/manual/en/simplexml.examples-basic.php] 영문
[링크 : http://php.net/manual/kr/simplexml.examples-basic.php] 국문
'Programming > php' 카테고리의 다른 글
php 콘솔 디버깅 (0) | 2015.01.13 |
---|---|
php simpleXML saveXML 정렬하기 (well-formed XML) (0) | 2014.12.23 |
xcache 1.3.2 for php 5.3.22 for ARM (0) | 2014.11.11 |
lighttpd + php 퍼미션 문제 (0) | 2014.10.21 |
php.ini extension_dir (0) | 2014.10.20 |