Jump to content

How to read XML Element from XML File


ramandeep1980

Recommended Posts

Hi Everyone,

I am able to read XML attributes from XML file but not able to read XML elements.

In below example,I am able to read comment , entered,center etc by giving xPath till Event tag and giving description of fields as @comment, @entered and @center etc but not able to read aReason by giving xPath till Reasons tag and using @aReason as a field decription, the reason i understand is that comment, entered etc are atrribute of XML where as aReason are XML elements.

 <Event comment="Coll" entered="Se" Center="ET" appro="1" age="3"
                <Reasons>
                    <aReason>Missing</aReason>
                   <aReason>Missing1</aReason>
                   <aReason>Missing2/aReason>
                </Reasons>
</Event>

Can you please tell me wat xPath and wat field description i need to use to read aReason , XML elements.

Regards,

Raman

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...