This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Updating XML - how to convert an arraylist back to a node

 
John Dowling
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See code below; when i parse xmlInput on line 2 an arraylist appears to be returned for program. How do i convert this back to a node suitable for XmlNodePrinter? Can this be done with MarkupBuilder? Thanks


def xmlInput = parser.parse (new FileInputStream(INPUT_XML))
def program = xmlInput["md:programs"]["md:program"]

writer = new StringWriter()
new XmlNodePrinter(new PrintWriter(writer)).print(program)
println (writer.toString())
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic