[jdom-interest] how to get XmlOutputter to accept xmlns in an
Bradley S. Huffman
hip at a.cs.okstate.edu
Tue Feb 20 13:32:30 PST 2007
Element kml = new Element("kml", Namespace.getNamespace("http://earth.google.com/kml/2.1"));
"Michael E. Ross" writes:
> I've been through the search and manuals I have available. From what I have
> read what I'm
> asking seems to not be allowed. Yet it seems neccesary for an application
> I'm working on.
> I'm using XmlOutputter to generate xml files for GoogleEarth. They will be
> updated every
> 60 seconds so no hand editing is possible. I need to get this line in my xml
> <kml xmlns="http://earth.google.com/kml/2.0">
> The java code I have looks like this;
> Element kml = new Element("kml");
> Attribute xmlns = new Attribute("xmlns","http://earth.google.com/kml/2.1");
> This of course throws a org.jdom.IllegalNameException.
> I have tried various uses of the Namespace field but have not found a way to
> do it.
> Any ideas? I want to use XmlOutputter as it makes codeing much cleaner.
> To control your jdom-interest membership:
More information about the jdom-interest