I have two columns in a spreadsheet.
One column is an XPath expression used to get a value from an existing XML document. The other column is an XPath expression from which I need to create my XSLT/output XML document. The value grabbed from the first column will be the value placed in the second column's element.
So for example if the second column has the XPath /A/B/C, I would create
<A>
<B>
<C><xsl:value-of select = "corresponding value from 1st column"/></C>
</B>
</A>
If the next XPath is /A/B/D, I would add
<D><xsl:value-of select = "corresponding value from 1st column"/></D>
as a sibling of C.
I'm expected to create this output XML/XSLT structure by hand. However there are thousands of lines.
I'm looking for suggestions on how to do this programmatically in Java. I've never mixed Java/XML/XPath so maybe there are libraries that can help with this? If it's an enormous undertaking I won't be able to justify it as opposed to just doing it by hand. If I can write something that gets me most of the way there I'd be happy. Is this a pipe dream?