I am using XML and JDOM for the first time, and want to build a document using:
Element root = new Element("myReport");
Document doc = new Document(root);
Then I want to add attributes for namespace and schema
root.setAttribute("xmlns:asi",
root.setAttribute("xsi:schemaLocation",
"C:/config/myReport.xsd");
This results in an error which states: "Attribute names cannot contain colons."
I think I can deal with the namespace by assigning the namespace when I build each element. I have not figured out how to assign a schema location without using the SAXBuilder class to build my document. That option seems to require that I have a physical xml file, which I don't need.
Suggestions?
Thanks.
- Henry