groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GroovyBeginner <groovybegin...@gmail.com>
Subject Add Namespace to the XML attribute
Date Mon, 04 Jul 2016 17:01:45 GMT
Hi, 
I'm trying to accomplish adding the namespace to the attribute . Is there a
way to do this?Here is the XML structure.
 <?xml version="1.0" encoding="UTF-8"?><bk:Books
xmlns:bk="urn:com.books/findbooks">
  <bk:book bk:available="20" isavailable="1" bk:id="1">
    <bk:title isavailable="0">Don Xijote</bk:title>
    <bk:author bk:available="20" isavailable="1" bk:id="1">Manuel De
Cervantes</bk:author>
  </bk:book>
</bk:Books>

My Output should get the following:

 <?xml version="1.0" encoding="UTF-8"?><bk:Books
xmlns:bk="urn:com.books/findbooks">
  <bk:book bk:available="20" bk:isavailable="1" bk:id="1">
    <bk:title bk:isavailable="0">Don Xijote</bk:title>
    <bk:author bk:available="20" bk:isavailable="1" bk:id="1">Manuel De
Cervantes</bk:author>
  </bk:book>
</bk:Books>




--
View this message in context: http://groovy.329449.n5.nabble.com/Add-Namespace-to-the-XML-attribute-tp5733765.html
Sent from the Groovy Dev mailing list archive at Nabble.com.

Mime
View raw message