下面是我的XML,我想用头来读取这个xml中的数据 像“罪行定罪”一样分开是标题/部分 这个标签下面的数据,元素的xml结构/嵌套可能 获取不同的记录再见记录,请帮助我如何阅读此数据
<pddata type="details" sitetype="xml">
<pdheaders/>
<pdfooters>
<pdfooter0 hyperlink="">
</pdfooter0>
</pdfooters>
<detailsdata db="" ed="" rec="" title="Department of Corrections - Released Detail"/>
<user>
<dlnumber>fdsgsd</dlnumber>
<dlstate>dfgdsg</dlstate>
<id>fdgds</id>
<identifier/>
<sessionid>dsfgdsgdsgd</sessionid>
</user>
<servers>
<searchserver></searchserver>
<loginserver></loginserver>
<mainserver></mainserver>
</servers>
<lookups>
<charged></charged>
<available></available>
</lookups>
<dataset label="Department of Corrections - Released" rec="">
<dataitem>
<textdata>
<field label="DIN">87T1522</field>
<field label="Last Name" asilist="main|name">SMITH</field>
<field label="First Name" asilist="main|name">ERIC</field>
<field label="Middle Initial" asilist="main|name"/>
<field label="Suffix"/>
<field label="NYS ID">4276184L</field>
<field label="Sex">Male</field>
<field label="Date Of Birth" formatteddate="19620320" asilist="main">Mar 20 1962</field>
<field label="Ethnic Group">Non-Hispanic</field>
<field label="Race">Black</field>
<field label="Custody Status">Released/Discharged</field>
<field label="Original Reception Date" formatteddate="19871223">Dec 23 1987</field>
<field label="Latest Reception Date" formatteddate="19871223">Dec 23 1987</field>
<field label="Owning Facility Code"/>
<field label="Owning Facility Name"/>
<field label="Most Serious Prior">1</field>
<field label="Total Crimes">001</field>
<field label="Crime 1 Attempt Indicator">Attempted</field>
<field label="Crime 1 Hate Indicator">none found</field>
<field label="Crime 1 Crime Code">0502</field>
<field label="Crime 1 Crime Code Description">ROBBERY 2ND</field>
<field label="Crime 1 Crime Class">D Felony</field>
<field label="Crime 1 Felony Offender Type">Second Felony Offender</field>
<field label="Crime 1 Counts">001</field>
<field label="Crime 1 Commitment County Code">30</field>
<field label="Crime 1 Commitment County Name">NEW YORK</field>
<field label="Crime 1 Commitment Court Name">SUPREME</field>
<field label="Crime 2 Attempt Indicator">none found</field>
<field label="Crime 2 Hate Indicator">none found</field>
<field label="Crime 2 Crime Code"/>
<field label="Crime 2 Crime Code Description"/>
<field label="Crime 2 Crime Class">none found</field>
<field label="Crime 2 Felony Offender Type">none found</field>
<field label="Crime 2 Counts"/>
<field label="Crime 2 Commitment County Code"/>
<field label="Crime 2 Commitment County Name"/>
<field label="Crime 2 Commitment Court Name"/>
<field label="Crime 3 Attempt Indicator">none found</field>
<field label="Crime 3 Hate Indicator">none found</field>
<field label="Crime 3 Crime Code"/>
<field label="Crime 3 Crime Code Description"/>
<field label="Crime 3 Crime Class">none found</field>
<field label="Crime 3 Felony Offender Type">none found</field>
<field label="Crime 3 Counts"/>
<field label="Crime 3 Commitment County Code"/>
<field label="Crime 3 Commitment County Name"/>
<field label="Crime 3 Commitment Court Name"/>
<field label="Aggregate Minimum Sentence">00020600</field>
<field label="Aggregate Maximum Sentence">00050000</field>
<field label="Parole Hearing Date" formatteddate="199112">199112</field>
<field label="Parole Hearing Type">Reappearance</field>
<field label="Parole Hearing Release Date" formatteddate=""/>
<field label="Parole Eligibility Date" formatteddate="19900117">Jan 17 1990</field>
<field label="Time Allowance Committee Date" formatteddate=""/>
<field label="Time Allowance Committee Type">none found</field>
<field label="Conditional Release Date" formatteddate="19910817">Aug 17 1991</field>
<field label="Maximum Expiration Date" formatteddate="19920717">Jul 17 1992</field>
<field label="Release Discharge Code">220</field>
<field label="Release Discharge Description">COND RELEASE DIV OF PAROLE</field>
<field label="Release Discharge Date" formatteddate="19910816">Aug 16 1991</field>
<field label="NYS ID 2"/>
</textdata>
<dataset label="Crimes of Conviction" rec="87T1522">
<dataitem>
<textdata>
<field label="DIN" asilist="main">87T1522</field>
<field label="Crime Attempt Indicator">Attempted</field>
<field label="Crime Hate Indicator">none found</field>
<field label="Crime Code">0502</field>
<field label="Crime Code Description">ROBBERY 2ND</field>
<field label="Crime Class">D Felony</field>
<field label="Felony Offender Type">Second Felony Offender</field>
<field label="Counts">001</field>
<field label="Commitment County Code">30</field>
<field label="Commitment County Name">NEW YORK</field>
<field label="Commitment Court Name">SUPREME</field>
</textdata>
</dataitem>
</dataset>
</dataitem>
</dataset>
</pddata>