Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Default Namespace

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Ed Davies <edavies AT nildram.co.uk>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Default Namespace
  • Date: Thu, 02 Nov 2006 17:12:00 +0000

Elliotte Harold wrote:
John Watson wrote:
Thanks for the amazingly prompt reply, Elliotte! Afraid I want the root
element to look like this:

<data xmlns="http://www.satelliteinfo.co.uk/feed/master/hrdg";
xmlns:hrdg="http://www.satelliteinfo.co.uk/feed/master/hrdg"; />


Element e = new Element("data", "http://www.satelliteinfo.co.uk/feed/master/hrdg";);
e.addNamespaceDeclaration("hrdg", "http://www.satelliteinfo.co.uk/feed/master/hrdg";);


The Javadoc for addNamespaceDeclaration doesn't specifically say
if the prefix String can be empty or null. It seems plausible
that you set the default namespace by passing an empty string,
but that would only be a guess.

Ed.





Archive powered by MHonArc 2.6.24.

Top of Page