axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <gdani...@macromedia.com>
Subject GetAsDOM
Date Fri, 10 Aug 2001 16:16:38 GMT

So getAsDOM works by serializing the element out to a string, then parsing
that as a mini-document.  There's a problem with this, though - it doesn't
work if there are are namespaced attributes... If we originally had the
"xsi" prefix declared at the top level (i.e. <Envelope>), and then ask for
this header as DOM:

<someHeader xsi:type="fooType"/>

The parser will complain because we're trying to parse exactly that string,
which doesn't contain a namespace declaration for the xsi:type element, and
thus this is bad XML.

If we change the serializer to add the namespace declaration, we alter the
structure of the document and, although the parse will work then, we lose
the correctness of the DOM representation.

Any suggestions?  All I can think of at the moment is to serialize the
entire envelope, parse it as DOM, and then find the element we're looking
for in the tree.... (keeping a cached copy of the DOM around, probably)

Glen Daniels
Macromedia
http://www.macromedia.com/
                                Building cool stuff for web developers


Mime
View raw message