A tricky conversion

webmasterbeta

New Member
Hi fellow XML programmers,I encountered a tricky (at least to me) conversion, and I could not solveit by any "direct" means.It really is interesting; and I think it will be so for many of us.I have XML data source (I can't modify the source format) of the form<doc><topic>hello</topic><a>h1</a><a>h2</a><topic>world</topic><a>w1</a><a>w2</a></doc>Which I want to convert to (before I do any further processing).<doc><topic desc="hello"><a>h1</a><a>h2</a></topic><topic desc="world"><a>w1</a><a>w2</a></topic></doc>I digged-in into all the information I have access to, it looks like thesolution is not so trival. Could any one please advice of a neat solutionthey could think of.Thank you,Aaron
 
Back
Top