update : 2015.11.03
php.shukuma.com검색:
|
simplexml_load_string(PHP 5) simplexml_load_string — Interprets a string of XML into an object 설명
SimpleXMLElement simplexml_load_string
( string
$data
[, string $class_name = "SimpleXMLElement"
[, int $options = 0
[, string $ns = ""
[, bool $is_prefix = false
]]]] )Takes a well-formed XML string and returns it as an object. 인수
반환값
Returns an object of class SimpleXMLElement with
properties containing the data held within the xml document,실패 시 오류/예외
Produces an Tip
Use libxml_use_internal_errors() to suppress all XML errors, and libxml_get_errors() to iterate over them afterwards. 예제
Example #1 Interpret an XML string
<?php 위 예제의 출력: SimpleXMLElement Object ( [title] => Forty What? [from] => Joe [to] => Jane [body] => I know that's the answer -- but what's the question? ) At this point, you can go about using $xml->body and such. 참고
|