Home » Developer & Programmer » JDeveloper, Java & XML » Getting the nodes of an xsd (Oracle 11g and jdk 1.6)
Getting the nodes of an xsd [message #329172] Tue, 24 June 2008 07:21
jyotiva
Messages: 1
Registered: June 2008
Junior Member
I have a schema, which has both complex type and simple type elements. I want to parse the schema and get the root element, complex type and simple type element names.
Though i have seen some similar queries in the forum but none of them provide a complete solution.
I have tried using XMLSchema and getXMLSchemaNodeTable() which gives the Hashtable() and i get the following output:
(java.util.Hashtable<K,V>){http://www.ifs.com/schema/teamDesc=oracle.xml.parser.schema.XMLSchemaNode@124e935,http://www.ifs.com/schema /teamDesc= oracle.xml.parser.schema.XMLSchemaNode@124e935 , http://www.w3.org/2001/XMLSchema= oracle.xml.parser.schema.XMLSchemaNode@4ac866}

How do i get the element name from the schema?

My schema looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.abc.com/schema/teamDesc"
attributeFormDefault="unqualified">
<element name="team">
<complexType>
<sequence>
<element name="teamLongDesc" maxOccurs="unbounded">
<complexType>
<sequence>
<element name="TeamId" type="integer" default="0" />
<element name="TeamCode" type="string" />
<element name="TeamDesc" type="string" />
</sequence>
<attribute name="isMaster" use="required" />
<attribute name="primaryKey" use="required" />
</complexType>
</element>
</sequence>
</complexType>
</element>
</schema>
Previous Topic: find which version jdbc client are using by oracle
Next Topic: Keeping list of values in a separate application definition
Goto Forum:
  


Current Time: Thu Nov 21 16:25:29 CST 2024