when I use simplexml_load_string, I find the question, lose data, after use.
$xml = '<dblp>
<inproceedings key="conf/aaim/He07" mdate="2007-06-28">
<author>Dan He</author>
<title>
<i>BMA</i>
<sup>*</sup>
: An Efficient Algorithm for the One-to-Some Shortest Path Problem on Road Maps.
</title>
<pages>346-357</pages>
<year>2007</year>
<crossref>conf/aaim/2007</crossref>
<booktitle>AAIM</booktitle>
<ee>http://dx.doi.org/10.1007/978-3-540-72870-2_33</ee>
<url>db/conf/aaim/aaim2007.html#He07</url>
</inproceedings>
</dblp>';
print_r(simplexml_load_string($xml));
execution result:
SimpleXMLElement Object
(
[inproceedings] => SimpleXMLElement Object
(
[@attributes] => Array
(
[key] => conf/aaim/He07
[mdate] => 2007-06-28
)
[author] => Dan He
[title] => SimpleXMLElement Object
(
[i] => BMA
[sup] => *
)
[pages] => 346-357
[year] => 2007
[crossref] => conf/aaim/2007
[booktitle] => AAIM
[ee] => http:
[url] => db/conf/aaim/aaim2007.html
)
)
Where is the data: "An effective algorithm for the one-on-one shortest path" on road maps "?
I hope the xml for array.but data is lost? thank. I want the result:
Array
(
[0] => Array
(
[inproceedings] =>Array
(
[author] => Dan He
[title] => Array
(
[0] => BMA
[2] => *
[5] => : An Efficient Algorithm for the One-to-Some Shortest Path Problem on Road Maps.
)
[pages] => 346-357
[year] => 2007
[crossref] => conf/aaim/2007
[booktitle] => AAIM
[ee] => http:
[url] => db/conf/aaim/aaim2007.html
)
)
)
source
share