Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

yaml2xml/xml2yaml implementation available?

Tags:

xml

yaml

What yaml2xml and xml2yaml tools are available?

I googled this, but it's not working correctly.

like image 977
prosseek Avatar asked Oct 25 '22 04:10

prosseek


1 Answers

Have you tried yaml2xml.py?

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=21461

There's a problem with the script mentioned in that page, if you try this version it should work:

#!/usr/bin/python
from yaml import load
from gnosis.xml.pickle import dumps
from sys import stdin
print dumps(load(stdin.read()))

Make sure the appropriate modules are installed, then make it executable and run it:

chmod +x ./yaml2xml.py
cat ./inputfile.yaml | ./yaml2xml.py
like image 124
NoBugs Avatar answered Nov 16 '22 06:11

NoBugs