Jython or Pyton issue-- Kindly Help me....

Venugopal Reddy venugopal.reddy at tspl.com
Mon Oct 13 13:39:33 CEST 2014

Dear All,

How to write a program for reading or parsing the XML file in Sub root Wise.

For ex:

Below XMl, I want to read/ parse first country details and here also two year tag values are there.. Here I need to read/parse first year value only measn '2008' Only..After that I need to read second country details.

Please help me .. i am struggling to get this solution..

<?xml version="1.0"?>
    <country name="Liechtenstein">
        <neighbor name="Austria" direction="E"/>
        <neighbor name="Switzerland" direction="W"/>
    <country name="Singapore">
        <neighbor name="Malaysia" direction="N"/>
    <country name="Panama">
        <neighbor name="Costa Rica" direction="W"/>
        <neighbor name="Colombia" direction="E"/>

More information about the Python-list mailing list