Autogenerating XPath from XML?
Hi all you programmers out there I've looked through the list and not found an answer for this question, so sorry if someone's already responded to this question. I'm looking for a way to programatically create a list of XPaths based on a given XML document. I can easily create an XPath that will sort of work with a standard XML document that doesn't have multiple items of the same name. For instance: <A> <B> <C>data</C> </B> <D> <X>y z</X> </D> </A> Becomes: //A //A/B //A/B/C //A/B/D //A/B/D/X My problem is, when I get to this: <A> <B> <VALUE/> </B> <B> <VALUE/> </B> <B> <VALUE/> </B> </A> I want: //A //A/B //A/B/VALUE //A/B //A/B/VALUE //A/B //A/B/VALUE I've tried several ways to do this, and I've tried looking through several tutorials. I'm banging my head on this one, as this is programmatically very difficult. Mentally, this is a piece-of-cake problem. Has anyone encountered this type of problem, created a piece of code that will generate what I'm looking for, or does anyone know of a project that has done this? Thanks in advance. -- Kenji XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format