Home » Developer & Programmer » JDeveloper, Java & XML » XPath - get element name - works in v11g, not in 10g (10g)
XPath - get element name - works in v11g, not in 10g [message #279683] Fri, 09 November 2007 10:41
panzertape
Messages: 20
Registered: August 2007
Junior Member
Hi!
I have a problem constructing a XPath-Statement...
That's my XML:
<Data_ITEM>
<ID></ID>
<PID></PID>
<TYPE></TYPE>
<wantedNodeName>
<someData></someData>
</wantedNodeName>
</Data_ITEM>

I am trying to get just the Nodename of the "wantedNodeName"-Node (the last node under Data_ITEM).
Data_ITEM/child::*[position()=last()] gets me the <wantedNodeName> and its child-elements (this works in PL/SQL 10g).

In some XPath-Editors and 11g the following statement returns the NodeName "wantedNodeName":
Data_ITEM/child::*[position()=last()]/name()

But when I try to run this statement in 10g I'm getting:
LPX-00601: Invalid token in statement

I found out, that the last statement (.../name()) is working under Oracle v11g. But I need it in Oracle v10g.

Do you have any ideas for a workaround to retrieve the nodename as text?

thanks in advance!
Previous Topic: Closed Statement
Next Topic: Views missing - XDB.PATH_View and XDB.Resource_View
Goto Forum:
  


Current Time: Tue Apr 16 09:08:52 CDT 2024