How to extract details from the xml files using java?

KarinaDallas

New Member
I have the following type of XML file,\[code\]<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult, 29 October 2004//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd"><eSummaryResult><DocSum> <Id>224589801</Id> <Item Name="Caption" Type="String">NC_000010</Item> <Item Name="Title" Type="String">Homo sapiens chromosome 10, GRCh37.p10 Primary Assembly</Item> <Item Name="Extra" Type="String">gi|224589801|gnl|ASM:GCF_000001305|10|ref|NC_000010.10||gpp|GPC_000000034.1||gnl|NCBI_GENOMES|10[224589801]</Item> <Item Name="Gi" Type="Integer">224589801</Item> <Item Name="CreateDate" Type="String">2002/08/29</Item> <Item Name="UpdateDate" Type="String">2012/10/30</Item> <Item Name="Flags" Type="Integer">544</Item> <Item Name="TaxId" Type="Integer">9606</Item> <Item Name="Length" Type="Integer">135534747</Item> <Item Name="Status" Type="String">live</Item> <Item Name="ReplacedBy" Type="String"/> <Item Name="Comment" Type="String"><![CDATA[ ]]></Item></DocSum></eSummaryResult>\[/code\]How to extract the details from node="Item" based on the name value it has? And also is it good to use the standard java dom xml or better to use any other xml parser library for this purpose?
 
Back
Top