anystyle
anystyle copied to clipboard
xml output
Hi! I'm trying to make a Docker container to run this to output XML, which I can do fine using the command line, though I'm having trouble doing it in Ruby. This works to get BibTeX out of a string input
:
output = AnyStyle.parse input, format: 'bibtex'
and if I change BibText to 'csl' I get CSL out. What do I need to get a string of XML out of this? Apologies if this is a dumb question!
You can get the XML like this:
output = AnyStyle.parse(input, format: 'wapiti').to_xml
You can pass an options hash to set the indent
, margin
or quote
options of XML Builder.
That works perfectly! Thanks so much.