I have 5 different key/value pairs and I know how my xml file should look. How can I create an xml file out of it? 1) I can always do printf() - not preferable. 2) Can I use xslt (stylesheet (.xsl) file) to do that?
And, I also want to be able to do the reverse operation of what I just mentioned. Given an xml file, I want to extract those 5 key/value pairs. I guess, I would need xsl file for this operation for sure.
I just need a starting point in terms of whether is doable or not. I can code myself in C.
Sample xml file:
<element1 type="type1" name="value1">
<start play="no"/>
<element2 aaa="AAA"/>
<element2 bbb="BBB"/>
<element3 ccc="CCC">
<element4/><!-- play="no"/>-->
</element3>
</element1>