Reading XML data using DOM in Java

nike

I am trying to get data from the below XML.

    <vehicle>
        <id>vehicle</id>
        <frame>
            <material>plastic</material>

When I read the data from the frame tag, how do i get the value of frame tag.

greenPadawan

You should fetch only the "Frame" tags using doc.getElementsByTagName("frame") and then print the value of their child "Material" tags.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related