When i create an element with namespaces it will not write out the namespaces.
def writeDocument(writer: XMLWriter)
val rss = doc.addElement("rss")
.addNamespace("g", "http://base.google.com/ns/1.0")
.addNamespace("c", "http://base.google.com/cns/1.0")
writer.writeOpen(rss) // => doesn't work <rss>
writer.write(rss) // => works <rss xmlns:c="http://base.google.com/ns/1.0" ... >
A normal write also writes out the namespaces
However when i write it using attributes it writes out the tag with namespaces.
def writeDocument(writer: XMLWriter)
val rss = XML.createElement("rss")
.addAttribute("xmlns:g", "http://base.google.com/ns/1.0")
.addAttribute("xmlns:c", "http://base.google.com/cns/1.0")
writer.writeOpen(rss) // => works <rss xmlns:c="http://base.google.com/ns/1.0" ... >
btw it is scala code but that shouldn't matter.
When i create an element with namespaces it will not write out the namespaces.
A normal write also writes out the namespaces
However when i write it using attributes it writes out the tag with namespaces.
btw it is scala code but that shouldn't matter.