Muhammad Abdullah
Muhammad Abdullah

Reputation: 29

Reading root element from XML file

I want to read a root element from XML file.

<Records Heading="Image" Url="images.iteam.com/alpha.png" Val="un-val">
  <Record IdValues="OrdersID=120">
    <Col TableName="" Id="0" Name="Row" Cap="Row" Val="1" Type="" LinkId=""/>
.
.
.
  </Record>
</Record>

I have above code and I want to read Url="images.iteam.com/alpha.png" value in code. This code is saved in xml file and I am using java language for this.

Upvotes: 0

Views: 1789

Answers (1)

SSB
SSB

Reputation: 789

Use xml parser to parse xml file in java.

  1. DOM XML Parser Example

  2. SAX Parser Example

Upvotes: 1

Related Questions