[jdom-interest] way to not print namespaces?

T.B. Pogie pogietb at netscape.net
Wed Jun 26 05:23:25 PDT 2002

I've been struggling with that problem for some time now but still have no solution. To not read in the namespace at all I extended the Element and DefaultFactoryBuilder classes and changed all Element constructors to only pass one arguement - name. That works fine and the document's elements do not have namespaces but as soon as I use XMLOutputter to write the document the original namespaces somehow reappear (maybe from NamespaceStack??). As you said there are too many private methods to allow you to effectively extend XMLOutputter. If anyone has suggestions I'll be *very* interested.
TB Pogie

"Beleznay, Dave" <Dave.Beleznay at webct.com> wrote:

>Hi there,
>I'm looking at an xml document that's in one format, and wanting to
>convert it to another format, and I don't want to use an XSLT because
>its too slow.  
>My current problem is, the current format uses Schemas and namespaces,
>and the old document doesn't.  (I'm trying to go from the current
>format, back to the old format, for backwards compatibility) 
>I'd like to just take an XMLOutputter, and tell it to print the document
>but don't print any namespace information for the elements, but that
>doesn't seem to be an option.  I'd then like to override the call to
>printNamespace in XMLOutputter, but it's a private call, so I can't do
>Is there an easier way to either not read in the name space information
>/ wipe out the name space information in the document  / not print the
>namespace information in the final document?
>Thank you very much.
>David Beleznay
>Software Engineer
>To control your jdom-interest membership:

Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

More information about the jdom-interest mailing list