Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XPath to xsd:element??

807606Mar 13 2007 — edited Mar 13 2007
Hello all:

I'd like to use XPath to get all the nodes below that have the following tag "xsd:element ". Currently, I am using:
List nodes = doc.selectNodes("//xsd:element");
It returns a list with 0 elements. Why? Is it possible to use XPath with xsd tags? (It works when I use simple tags)

Thanks in advance

Here is a snippet of the xml.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
...
<xsd:sequence>
<xsd:element name="CATALOG_NAME" type="xsd:string" sql:field="CATALOG_NAME" minOccurs="0"/>
<xsd:element name="SCHEMA_NAME" type="xsd:string" sql:field="SCHEMA_NAME" minOccurs="0"/>
<xsd:element name="CUBE_NAME" type="xsd:string" sql:field="CUBE_NAME" minOccurs="0"/>
<xsd:element name="SET_NAME" type="xsd:string" sql:field="SET_NAME" minOccurs="0"/>
<xsd:element name="SCOPE" type="xsd:int" sql:field="SCOPE"/>
<xsd:element name="DESCRIPTION" type="xsd:string" sql:field="DESCRIPTION" minOccurs="0"/>
<xsd:element name="EXPRESSION" type="xsd:string" sql:field="EXPRESSION" minOccurs="0"/>
<xsd:element name="DIMENSIONS" type="xsd:string" sql:field="DIMENSIONS" minOccurs="0"/>
</xsd:sequence></xsd:complexType></xsd:schema>
<row>

Comments

james_sutherland
This should work if using TopLink/EclipseLink.
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 10 2007
Added on Mar 13 2007
3 comments
541 views