开发者

How to parse xml in this format

开发者 https://www.devze.com 2023-03-01 20:56 出处:网络
<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <!-- Edited by XMLSpy® --> <CATALOG>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<CATALOG>
    <CD>
        <TITLE>Empire Burlesque</TITLE>
        <ARTIST>Bob Dylan</ARTIST>
        <COUNTRY>USA</COUNTRY>
        <COMPANY>Columbia</COMPANY>
        <PRICE>10.90</PRICE>
        <YEAR>1985</YEAR>
    </CD>
    <CD>
      开发者_StackOverflow  <TITLE>Hide your heart</TITLE>
        <ARTIST>Bonnie Tyler</ARTIST>
        <COUNTRY>UK</COUNTRY>
        <COMPANY>CBS Records</COMPANY>
        <PRICE>9.90</PRICE>
        <YEAR>1988</YEAR>
    </CD>
</CATALOG>

How to parse it?


If you know the structure of the XML file I suggest to use TBXML. It's really easy to use and it's fast. And as far as I got your question, the structure is always the same.

Sandro Meier

0

精彩评论

暂无评论...
验证码 换一张
取 消