-2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Catalog SYSTEM "http://store.yahoo.com/doc/dtd/Catalog.dtd">
<Catalog StoreID="yhst-34564052343" StoreName="test.com" PublishTimestamp="1332786206">
<Item ID="10170090" TableID="yd-item">
<ItemField TableFieldID="more-image3" Value="test1"/>
<ItemField TableFieldID="price-range" Value="23"/>
<ItemField TableFieldID="more-image4" Value="test2"/>
<ItemField TableFieldID="name" Value="Liquid Light Drop 1 Pendant Light"/>
</Item>
<Item ID="10170191" TableID="yd-item">
<ItemField TableFieldID="more-image3" Value="test3"/>
<ItemField TableFieldID="price-range" Value="34"/>
<ItemField TableFieldID="more-image4" Value="test4"/>
<ItemField TableFieldID="name" Value="Liquid Light Drop 4 Pendant Light"/>
</Item>
</Catalog>
ID 10170191 통과하면, 출력은 아래와 같습니다 있도록 I 출력이 필요합니다조건으로 'ID'이 XML을 구문 분석하는 PHP 스크립트를 필요
more-image3:-test3
price-range:-34
more-image4:-test4
name:-Liquid Light Drop 4 Pendant Light
StackOverflow에 오신 것을 환영합니다. 여기에 질문하는 방법에 대한 지침은 [FAQ] (http://stackoverflow.com/faq) 및 특히 [어떻게 질문합니까?] (http://stackoverflow.com/faq#howtoask)를 참조하십시오. . –
기초를 확인하십시오 http://php.net/manual/en/ref.xml.php – ray
또는 더 기본적인 ... http://www.php.net/manual/en/simplexml.examples-basic.php – Gustav