4 ms·
I don't know if you're trolling, but here's how I'd do it in Python import xml.etree.ElementTree as ET tree = ET.parse('data.xml') new_tree = my_transfor
by jgalt212 12y ago
I don't know if you're trolling, but here's how I'd do it in Python
import xml.etree.ElementTree as ET
tree = ET.parse('data.xml')
new_tree = my_transform(tree)
new_tree.write("output.xml")
- ohyesyodo 12y agoI'm not sure if you are trolling, but you left out the actual transform. In my experience, XSLT feels optimized towards transforms, which most other languages aren't. I also dislike XSLT, but whenever I do things like this in Python, C# or C++ it tends to get more messy then my XLTS when the transforms are nontrivial.
- jgalt212 12y agoI'm getting downvotes here? Obviously, not from ohyesyodo b/c he does not have enough karma to allocate downvotes.