[jdom-interest] creating xml file fromjava object?

Corcos Igal CorcosI at BanqueLaurentienne.ca
Mon Mar 5 06:15:14 PST 2001

I have a similar request...

Essentially I have to parse an XML file, and then generate a new one based
on the requests and the values I received in the first one.
i.e. XML Requests -> process requests -> XML Response

Can anyone suggest an approach to do this?  Should the XML requests be
transformed into java objects first? Does anyone know of any examples of
this type of processing?

Any help would be greatly appreciated!

-Igal Corcos

-----Original Message-----
From: Ross Merritt [mailto:ross at longhairtech.com]
Sent: Sunday, March 04, 2001 5:02 PM
To: jdom-interest
Subject: [jdom-interest] creating xml file fromjava object?

Can someone point me to the example that will show me how to take one xml
file and generate another or how to store a java object of as an xml file?

----- Original Message -----
From: "Jeff Turner" <jeff at socialchange.net.au>
To: "jdom-interest" <jdom-interest at jdom.org>
Sent: Saturday, March 03, 2001 6:09 PM
Subject: Re: [jdom-interest] Inconsistancy in Namespace.hashCode().

> On Sat, Mar 03, 2001 at 10:34:08AM -0500, Elliotte Rusty Harold wrote:
> > At 2:45 PM -0800 2/28/01, Jason Hunter wrote:
> >
> > >Good eye.  I've changed the documentation on my local copy to be:
> > >
> > >      *  This returns a probably unique hash code for the
> > ><code>Namespace</code>.
> > >      *  If two namespaces have the same URI but different prefixes,
> > >may
> > >      *  have a different hash code.
> > >
> > >This correctly defines the behavior, and I think the existing behavior
> > >is correct.  Anyone (Elliotte esp) have concerns?
> > >
> >
> > Yes, I disagree. I'm not sure when the mistake got in, but the
> > comment is correct (i.e. it describes the right behavior) and the
> > current code is wrong. Two namespaces are equal if their URIs are
> > equal. The prefix should not be considered when testing for equality.
> >
> > I suppose you can argue that two Namespace objects are not equal if
> > they describe different prefixes. Maybe that makes sense, but it
> > makes me deeply uncomfortable.
> >
> > I guess the question comes down to what the use case for comparing
> > namespaces is. I would expect that the equals method would let us
> > take two set elements with possibly different prefixes, possibly one
> > in a default namespace, and determine whether or not they have the
> > same type; e.g. are both MathML set elements or is one a MathML set
> > element and one an SVG set element? This only works if we compare
> > based on URI and not prefix.
> Hmm.. that's exactly the scenario I find myself in, having parsed a
> like:
> <e xmlns="foo" xmlns:gml="foo"/>
> I didn't see anything disallowing multiple prefixes in the namespace WD.
> Now I'd like the following to be true:
> ( Namespace.getNamespace("foo").equals ( Namespace.getNamespace("gml",
"foo")) )
> Does that match most people's expectations?
> --Jeff
> _______________________________________________
> To control your jdom-interest membership:

To control your jdom-interest membership:

More information about the jdom-interest mailing list