How to flatten an XML file into a set of xpath expressions?

4567

New Member
Consider I have the following example XML file:\[code\]<ns1:create xmlns:ns1='http://predic8.com/wsdl/material/ArticleService/1/'> <article xmlns:ns1='http://predic8.com/material/1/'> <name xmlns:ns1='http://predic8.com/material/1/'>foo</name> <description xmlns:ns1='http://predic8.com/material/1/'>bar</description> <price xmlns:ns1='http://predic8.com/common/1/'> <amount xmlns:ns1='http://predic8.com/common/1/'>00.00</amount> <currency xmlns:ns1='http://predic8.com/common/1/'>USD</currency> </price> <id xmlns:ns1='http://predic8.com/material/1/'>1</id> </article></ns1:create>\[/code\]What would be the best (most efficient) way to flatten this into a set of xpath expressions.Note also: I want to ignore any namespace and attribute information. (If needed, this could also be done as a pre-processing step).So I want get as output:\[code\]/create/article/name/create/article/description/create/article/price/amount/create/article/price/currency/create/article/id\[/code\]I
 
Back
Top