Does anyone know of an existing means of creating an XML hierarchy programatically from an XPath expression?
For example if I have an XML fragment such as:
<feed>
<entry>
<data></data>
<content></content>
</entry>
</feed>
Given the XPath expression /feed/entry/content/@source I would have:
<feed>
<entry>
<data></data>
<content @source=""></content>
</entry>
</feed>
I realize this is possible using XSLT but due to the dynamic nature of what I'm trying to accomplish a fixed transformation won't work.
I am working in C# but if someone has a solution using some other language please chime in.
Thanks for the help!