私は初心者ですから、本当に助けが必要です! 私は空要素のリストをPHPで解析するXMLファイルを持っている:XML/PHP - 空の要素で属性を取得するにはどうすればよいですか?
<?xml version="1.0" encoding="utf-16"?>
<elements attribute="value" attribute="value">
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
<element attribute="value" attribute="value" attribute="value" />
...
</elements>
は、どのように私は、「要素」ノード内の各属性の値を得ることができますか?ご協力いただきありがとうございます!
[PHPのための最高のXMLパーサ]の可能複製(http://stackoverflow.com/questions/188414/best-xml-parser -for-php) –
空の要素または空でない要素から属性を得ることに違いはありません。また、質問をする前に研究を行うことになっているので、なぜhttp://stackoverflow.com/search?q=getting+attributes+xml+phpもあなたの質問に答えることができなかったことを指摘してください。 – Gordon