prosseek
prosseek

Reputation: 191129

yaml2xml/xml2yaml implementation available?

What yaml2xml and xml2yaml tools are available?

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

Upvotes: 5

Views: 1385

Answers (1)

NoBugs
NoBugs

Reputation: 9502

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

Upvotes: 3

Related Questions