Andrew Chamberlain wrote:

The last line (which uses the getTextContent() method) throws the following exception:

javax.xml.transform.TransformerException: java.lang.AbstractMethodError: org.apache.xml.dtm.ref.DTMNodeProxy.getTextContent()Ljava/lang/String; at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java:396)

For a better understanding, you should look at the portion of the stack trace following "caused by".


Firstly, I was expecting the Class to be "org.w3c.dom.Node", so does anyone know how I can enable this?

Rather difficult, since org.w3c.dom.Node is an interface, not a class: the object that is passed to the addGML function is an instance of org.apache.xml.dtm.ref.DTMNodeProxy, an actual class which happens to implement org.w3c.dom.Node.


I was also expecting the name of the first child to be "gml:exterior" instead of a "#text".

Understandable, since your XML has newlines and blanks before gml:exterior: try stripping all this baggage before parsing.

Regards,

--------------------
   Luca Morandini
www.lucamorandini.it
--------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to