Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   How to read child of child nodes using xml in java (https://www.askmehelpdesk.com/showthread.php?t=776468)

  • Nov 24, 2013, 08:22 PM
    syednaveed8
    How to read child of child nodes using xml in java
    Hi I am using the following XML file and would like to read the data for respective date in the child nodes. I want to pass date and want to retrieve data for that particular date. This is the first time I am calling child of child node. Please help.
    Thanks in advance.




    <Event>
    <DayOne>
    <Date>11/23/13 </Date>
    <Teamone>India</Teamone>
    <TeamTwo>Australia</TeamTwo>
    <Score1>2</Score1>
    <Score2>1</Score2>
    <Result>India</Result>
    </DayOne>
    <DayTwo>
    <Date>11/24/13</Date>
    <Teamone>China</Teamone>
    <TeamTwo>Japan</TeamTwo>
    <Score1>2</Score1>
    <Score2>3</Score2>
    <Result>Japan</Result>
    </DayTwo>
    <DayThree>
    <Date>11/25/13</Date>
    <Teamone>Germany</Teamone>
    <TeamTwo>Korea</TeamTwo>
    <Score1>2</Score1>
    <Score2>1</Score2>
    <Result>Germany</Result>
    </DayThree>

    </Event>

  • All times are GMT -7. The time now is 03:13 AM.