Jump to content
Sign in to follow this  
MDRI

How to make XPath list for a XML Message ?

Recommended Posts

Thanks for looking into this issue. I am not sure, whether this is the right forum to post this thread. If not, let me know the right forum to post this thread.

 

I have wellformed XML message. I want to produce a list/report as

 

1) All Xpath of XML message

 

2) Xpath , data content for this XPATH

 

Here is an example (Input XML Message)

<?xml version="1.0"?><PARTS><TITLE>Computer Parts</TITLE><PART><ITEM>Motherboard</ITEM><MANUFACTURER>ASUS</MANUFACTURER><MODEL>P3B-F</MODEL><COST> 123.00</COST></PART><PART><ITEM>Video Card</ITEM><MANUFACTURER>ATI</MANUFACTURER><MODEL>All-in-Wonder Pro</MODEL><COST> 160.00</COST></PART><PART><ITEM>Sound Card</ITEM><MANUFACTURER>Creative Labs</MANUFACTURER><MODEL>Sound Blaster Live</MODEL><COST> 80.00</COST></PART><PART><ITEM>inch Monitor</ITEM><MANUFACTURER>LG Electronics</MANUFACTURER><MODEL> 995E</MODEL><COST> 290.00</COST></PART></PARTS>

The desired output --> I created the following XML list manually

/PARTS/TITLE Computer       Parts/PARTS/PART[1]/ITEM         Motherboard/PARTS/PART[1]/MANUFACTURER ASUS/PARTS/PART[1]/MODEL        P3B-F/PARTS/PART[1]/COST         123.00/PARTS/PART[2]/ITEM         Video Card/PARTS/PART[2]/MANUFACTURER ATI...............................................................

I have XMLSPY, and I do not have additional tools kit associated with XMLSPY.

 

I tried with xml_grep in linux. It need the XPATH as input to get me the data content. I am not able to use xml_grep to extract attributes of XML message.

 

Are there any open source product to produce such report for XML Message?

 

What are the ways to extract XPATHs/XPATH, data content?

 

 

Thanks for helping.

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...