Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to Print date and id in given XML
    primarykey
    data
    text
    <p>This is my xml format:</p> <pre><code>&lt;taxmann&gt; &lt;docdetails&gt; &lt;info id="104010000000006516" date="20120120"&gt; &lt;physicalpath&gt;\\192.168.1.102\CMS\DATA&lt;/physicalpath&gt; &lt;filepath isxml="N"&gt;\CIRCULARS\DIRECTTAXLAWS\HTMLFILES\CIRDGBACDD4836150012011122012012.htm&lt;/filepath&gt; &lt;summary&gt;&lt;/summary&gt; &lt;description&gt;&lt;/description&gt; &lt;heading&gt;DGBA.CDD. NO.H- 4836 /15.02.001/2011-12 | Clarification on Regulation of Interest Rates for Small Savings Schemes&lt;/heading&gt; &lt;correspondingcitation/&gt; &lt;hasfile&gt;YES&lt;/hasfile&gt; &lt;sortby&gt;20120328155728957&lt;/sortby&gt; &lt;parentid&gt;&lt;/parentid&gt; &lt;parentchapterid&gt;&lt;/parentchapterid&gt; &lt;/info&gt; &lt;/docdetails&gt; &lt;/taxmann&gt; </code></pre> <p>I'm able to retrieve data of heading but I want to print date and id too but I'm not able to do this. Please tell me how to implement it.</p> <pre><code>XMLParser parser = new XMLParser(); String xml = parser.getXmlFromUrl(url); // getting XML Document doc = parser.getDomElement(xml); // getting DOM element NodeList nl = doc.getElementsByTagName(KEY_ITEM); ArrayList&lt;HashMap&lt;String, String&gt;&gt; menuItems = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;(); HashMap&lt;String, String&gt; map; for (int i = indexRowStart; i &lt; indexRowEnd; i++) { Element e = (Element) nl.item(i); // adding each child node to HashMap key =&gt; value map = new HashMap&lt;String, String&gt;(); map.put("RowID", String.valueOf(RowID)); String Heading= parser.getValue(e, KEY_NAME).replace("|", "|\n").replace("|", ""); map.put(KEY_NAME,Heading); // adding HashList to ArrayList menuItems.add(map); } </code></pre> <p>This is my code please tell me the logic how I can parse, so that I can get date and id too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload