Help needed ... Default tables in XML Schema

Hi all,
I got a xsd definition here that does not do as I say ... g
Though I specified default tables for Cisco_Card and Cisco_LogicalModule, not only the default tables with the names I specified are created but also additionally tables with the default name that is used if no name is specified.
Actually I am trying to tell it defaultTable="" so no table at all is created. But there are always two tables: Cisco_Card1529_TAB and Cisco_LogicalModule1501_TAB.
Can someone explain to me what I am doing wrong here?
Thanks,
Steff
<xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xdb:storeVarrayAsTable="true">
     <xs:element name="InvDetails" xdb:defaultTable="XML_CISCOWORKS" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element ref="SchemaInfo" minOccurs="0"/>
                    <xs:element ref="RMEPlatform" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="SchemaInfo" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="RMEServer" type="xs:string" minOccurs="0"/>
                    <xs:element name="CreatedAt" type="xs:string" minOccurs="0"/>
                    <xs:element name="SchemaVersion" type="xs:string" minOccurs="0"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="RMEPlatform" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element ref="Cisco_Chassis" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_NetworkElement" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_ComputerSystemPackage" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_Chassis" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:string"/>
                    <xs:element name="Model" type="xs:string" minOccurs="0"/>
                    <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                    <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                    <xs:element name="ChassisSystemType" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                    <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="Cisco_Backplane" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_Backplane" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="BackplaneType" type="xs:string" minOccurs="0"/>
                    <xs:element name="Model" type="xs:string" minOccurs="0"/>
                    <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_Card" xdb:defaultTable="lala" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="RequiresDaughterBoard" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="Model" type="xs:string" minOccurs="0"/>
                    <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                    <xs:element name="LocationWithinContainer" type="xs:string" minOccurs="0"/>
                    <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
                    <xs:element name="CardType" type="xs:string" minOccurs="0"/>
                    <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element name="OperationalStatus" type="xs:string" minOccurs="0"/>
                    <xs:element name="FWManufacturer" type="xs:string" minOccurs="0"/>
                    <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                    <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="SoftwareIdentity" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_CommunicationConnector" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_FlashDevice" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_PhysicalMemory" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_CommunicationConnector" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="ConnectorType" type="xs:string" minOccurs="0"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_FlashDevice" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="FlashDeviceType" type="xs:string" minOccurs="0"/>
                    <xs:element name="Size" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfPartitions" type="xs:integer" minOccurs="0"/>
                    <xs:element name="ChipCount" type="xs:integer" minOccurs="0"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element name="Removable" type="xs:boolean" minOccurs="0"/>
                    <xs:element ref="Cisco_FlashPartition" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_FlashPartition" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="Upgrade" type="xs:string" minOccurs="0"/>
                    <xs:element name="NeedsErasure" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="PartitionStatus" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="unknown"/>
                                   <xs:enumeration value="readOnly"/>
                                   <xs:enumeration value="runFromFlash"/>
                                   <xs:enumeration value="readWrite"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="FileSystemSize" type="xs:string" minOccurs="0"/>
                    <xs:element name="AvailableSpace" type="xs:string" minOccurs="0"/>
                    <xs:element name="FileCount" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="Cisco_FlashFile" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_FlashFile" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="FileSize" type="xs:string" minOccurs="0"/>
                    <xs:element name="FileStatus" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="unknown"/>
                                   <xs:enumeration value="deleted"/>
                                   <xs:enumeration value="invalidChecksum"/>
                                   <xs:enumeration value="valid"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="Checksum" type="xs:string" minOccurs="0"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_PhysicalMemory" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="MemoryType" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="nvRam"/>
                                   <xs:enumeration value="NVRAM"/>
                                   <xs:enumeration value="processorRam"/>
                                   <xs:enumeration value="RAM"/>
                                   <xs:enumeration value="ROM"/>
                                   <xs:enumeration value="FEPROM"/>
                                   <xs:enumeration value="BRAM"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="Capacity" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_NetworkElement" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element name="PrimaryOwnerName" type="xs:string" minOccurs="0"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="PhysicalPosition" type="xs:string" minOccurs="0"/>
                    <xs:element name="SysObjectId" type="xs:string" minOccurs="0"/>
                    <xs:element name="SysUpTime" type="xs:string" minOccurs="0"/>
                    <xs:element name="OfficialHostName" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfPorts" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="Cisco_LogicalModule" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_Port" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_MemoryPool" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_IfEntry" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_IPProtocolEndpoint" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_PEHasIfEntry" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_LogicalModule" xdb:defaultTable="lolo" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="ModuleNumber" type="xs:integer" minOccurs="0"/>
                    <xs:element name="ModuleType" type="xs:string" minOccurs="0"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="EnabledStatus" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfPorts" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="Cisco_Port" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_LogicalModule" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_OSElement" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_Port" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="PortNumber" type="xs:integer" minOccurs="0"/>
                    <xs:element name="PortType" type="xs:string" minOccurs="0"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="IfInstanceID" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_MemoryPool" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="PoolType" type="xs:integer" minOccurs="0"/>
                    <xs:element name="DynamicPoolType" type="xs:string" minOccurs="0"/>
                    <xs:element name="AlternatePoolType" type="xs:string" minOccurs="0"/>
                    <xs:element name="IsValid" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="Allocated" type="xs:string" minOccurs="0"/>
                    <xs:element name="Free" type="xs:string" minOccurs="0"/>
                    <xs:element name="LargestFree" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
                    <!--PoolType ValueMap {"0", "1", "2", "3", "4", "5", "65536"},
Values {"Unknown", "Processor", "I/O", "PCI", "Fast", "Multibus", "Dynamic"},
-->
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_OSElement" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="OSFamily" type="xs:string" minOccurs="0"/>
                    <xs:element name="Version" type="xs:string" minOccurs="0"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_IfEntry" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:string"/>
                    <xs:element name="InstanceName" type="xs:string" minOccurs="0"/>
                    <xs:element name="ProtocolType" type="xs:string" minOccurs="0"/>
                    <xs:element name="Speed" type="xs:string" minOccurs="0"/>
                    <xs:element name="RequestedStatus" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="up"/>
                                   <xs:enumeration value="down"/>
                                   <xs:enumeration value="testing"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="OperationalStatus" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="Up"/>
                                   <xs:enumeration value="Down"/>
                                   <xs:enumeration value="Testing"/>
                                   <xs:enumeration value="Unknown"/>
                                   <xs:enumeration value="Dormant"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element name="PhysicalAddress" type="xs:string" minOccurs="0"/>
                    <xs:element name="NetworkAddress" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_IPProtocolEndpoint" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="Address" type="xs:string" minOccurs="0"/>
                    <xs:element name="SubnetMask" type="xs:string" minOccurs="0"/>
                    <xs:element name="DefaultGateway" type="xs:string" minOccurs="0"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_PEHasIfEntry" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="Cisco_IPProtocolEndpoint" type="xs:string" minOccurs="0"/>
                    <xs:element name="Cisco_IfEntry" type="xs:string" minOccurs="0"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="Cisco_ComputerSystemPackage" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="Antecedent" type="xs:string" minOccurs="0"/>
                    <xs:element name="Dependent" type="xs:string" minOccurs="0"/>
                    <!--
Antecedent is the InstanceID from Cisco_Chassis Element
Dependent is the InstanceID from Cisco_NetworkElement
-->
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="SoftwareIdentity" xdb:defaultTable="" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="Classification" minOccurs="0">
                         <xs:simpleType>
                              <xs:restriction base="xs:string">
                                   <xs:enumeration value="Firmware"/>
                                   <xs:enumeration value="Software"/>
                              </xs:restriction>
                         </xs:simpleType>
                    </xs:element>
                    <xs:element name="VersionString" type="xs:string" minOccurs="0"/>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
     <xs:element name="AdditionalInformation" xdb:defaultTable="" xdb:maintainDOM="true">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="AD" minOccurs="0" maxOccurs="unbounded" xdb:maintainDOM="false">
                         <xs:complexType>
                              <xs:attribute name="name" type="xs:string"/>
                              <xs:attribute name="value" type="xs:string"/>
                         </xs:complexType>
                    </xs:element>
               </xs:sequence>
          </xs:complexType>
     </xs:element>
</xs:schema>

Here's the Culprit
<xs:element name="Cisco_Card" xdb:defaultTable="lala" xdb:maintainDOM="false">
          <xs:complexType>
               <xs:sequence>
                    <xs:element name="InstanceID" type="xs:integer"/>
                    <xs:element name="RequiresDaughterBoard" type="xs:boolean" minOccurs="0"/>
                    <xs:element name="Model" type="xs:string" minOccurs="0"/>
                    <xs:element name="SerialNumber" type="xs:string" minOccurs="0"/>
                    <xs:element name="LocationWithinContainer" type="xs:string" minOccurs="0"/>
                    <xs:element name="PartNumber" type="xs:string" minOccurs="0"/>
                    <xs:element name="CardType" type="xs:string" minOccurs="0"/>
                    <xs:element name="HardwareVersion" type="xs:string" minOccurs="0"/>
                    <xs:element name="Description" type="xs:string" minOccurs="0"/>
                    <xs:element name="OperationalStatus" type="xs:string" minOccurs="0"/>
                    <xs:element name="FWManufacturer" type="xs:string" minOccurs="0"/>
                    <xs:element name="Manufacturer" type="xs:string" minOccurs="0"/>
                    <xs:element name="NumberOfSlots" type="xs:integer" minOccurs="0"/>
                    <xs:element name="NoOfCommunicationConnectors" type="xs:integer" minOccurs="0"/>
                    <xs:element ref="SoftwareIdentity" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_CommunicationConnector" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_FlashDevice" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_PhysicalMemory" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="Cisco_Card" minOccurs="0" maxOccurs="unbounded"/>
                    <xs:element ref="AdditionalInformation" minOccurs="0" maxOccurs="unbounded"/>
               </xs:sequence>
          </xs:complexType>Note that the element Cisco_Card contains a ref to itself. The same is true of the element Cisco_LogicalModule.
When we encounter recursive structures we break the recursion by storing the recursive elements out-out-line is a seperate table and using a pointer (REF XMLType) column to track the relationionship..
You can name these elements by putting an xdb:SQLInline="false" and xdb:defaultTable="YOUR_TABLE_NAME" on the recursive element.
If you need to query accross these elements I would strongly advise upgrading to 10.2.x. In 10.2.x we implemented a number of optimizations for dealing with storing and querying this kind of structure.

Similar Messages

  • Dynamic Table with XML Schema

    Hi, I am new to livecycle and wondering if there is any sample for setting up the dynamic table with XML schema so I can access the data through workbench's xpath. thanks.

    Ivor,
    Take a look at the samples shipped with Designer. For 8.2.1 release take a look at
    C:\Program Files\Adobe\LiveCycle Designer ES\8.2\EN\Samples\Forms\Purchase Order\Schema\Schema\Purchase Order.xsd
    and the form samples.
    Otherwise, forward a request to [email protected] I would be happy to send you a sample XDP with a dynamic table and a schema.
    Steve

  • Help needed for db to xml conversion & vice versa. & other tools

    HI GURRUS!
    I would like to need a solution for my university assignment ,
    I want to create a web service which provides necessary interfaces to create, read (query), update, and delete data from relational db.
    It fully utilizes the XML from the database all the way to the web service clients and create web pages that consume the same XML for data entry. i want to acomplish this assignment in J2EE using WebLogic.
    I found lot of tools & api's on internet, but need help to suggest that wchih is best for this task & also need some good help to accomplish it more n more easily.
    tools & apis are:
    1) DB2XML ---> only cretae xml from db & also use "table based mapping"
    2)XML-DBMS
    3)Hit software's ---> Allora (don't know much about it)
    4) Java api WebRowSet
    questions:1) which are the best tools and software packages to be used to faciliate creation and maitenance of the XML schema and keeping it in sync with the database?
    2)any good tools to create the database schema directly from the XML. Are there tools out there to generate a database access layer based on the XML?
    3) Is any one have good java Webrowset example to accomplish that taks(get data from relational db send it to clint as xml using webservice & if client make changes in xml than it sync back the info in relational db)?
    Thanks in advance

    Oops sorry i just want to create a method which saves the created dom document as an xml file.
    Thanks in advance !

  • How to create default column in XML schema ?

    Hi All,
    I would like to define a default column let's say Run_Date as Date datatype in XML schema definition (XSD) and would like to populate SYSDATE to the column Run_Date, When XML records are parsed to that schema.
    Please let me know, how we can achieve?
    Thanks in Advance.

    Hi,
    Thanks for the update. Please find below my responses and let me know your thoughts.
    The Existing schema definition is as follows
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="Emp" type="EmpType" xdb:defaultTable="EMPLOYEES" xdb:columnProps="CONSTRAINT emp_pk PRIMARY KEY (XMLDATA.EMP_NO)" />
    <xs:complexType name="EmpType" xdb:SQLType="EMPLOYEES_T">
    <xs:sequence>
    <xs:element name="EmpNo" xdb:SQLName="EMP_NO">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="FirstName" xdb:SQLName="FIRST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="LastName" xdb:SQLName="LAST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmployeeType" xdb:SQLName="EMPLOYEE_TYPE">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="25"/>
    <xs:enumeration value="Permanent"/>     
    <xs:enumeration value="Consultant"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpLocation" xdb:SQLName="EMP_LOCATION">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="25"/>
    <xs:enumeration value="NewYork"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpExperience" xdb:SQLName="EMP_EXPERIENCE">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    The sample XML file is as follows
    <?xml version="1.0"?>
    <Emp xsi:noNamespaceSchemaLocation="EMP.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb="http://xmlns.oracle.com/xdb">
    <EmpNo>1001</EmpNo>
    <FirstName>William</FirstName>
    <LastName>Don</LastName>
    <EmployeeType>Permanent</EmployeeType>
    <EmpLocation>NewYork</EmpLocation>
    <EmpExperience>10</EmpExperience>
    </Emp>
    The modified schema definition is as follows
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="Emp" type="EmpType" xdb:defaultTable="EMPLOYEES" xdb:columnProps="CONSTRAINT emp_pk PRIMARY KEY (XMLDATA.EMP_NO)" />
    <xs:complexType name="EmpType" xdb:SQLType="EMPLOYEES_T">
    <xs:sequence>
    <xs:element name="EmpNo" xdb:SQLName="EMP_NO">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="FirstName" xdb:SQLName="FIRST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="LastName" xdb:SQLName="LAST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmployeeType" xdb:SQLName="EMPLOYEE_TYPE">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="25"/>
    <xs:enumeration value="Permanent"/>     
    <xs:enumeration value="Consultant"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpLocation" xdb:SQLName="EMP_LOCATION">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="25"/>
    <xs:enumeration value="NewYork"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpExperience" xdb:SQLName="EMP_EXPERIENCE">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="WorkHrs" maxOccurs="100" xdb:SQLName="WorkHrs" xdb:propNumber="3280" xdb:global="false" xdb:SQLType="WorkHrs_T" xdb:SQLSchema="APPS" xdb:memType="258" xdb:SQLInline="true" xdb:MemInline="false" xdb:JavaInline="false" xdb:SQLCollType="WORKHRS330_COLL" xdb:SQLCollSchema="APPS">
    <xs:complexType xdb:SQLType="WORKHRS_T" xdb:SQLSchema="APPS">
    <xs:attribute name="Day" xdb:SQLName="DAY" xdb:propNumber="3273" xdb:global="false" xdb:SQLType="VARCHAR2" xdb:memType="2">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="Hrs" xdb:SQLName="HRS" xdb:propNumber="3274" xdb:global="false" xdb:SQLType="NUMBER" xdb:memType="2">
    <xs:simpleType>
    <xs:restriction base="xs:decimal"/>
    </xs:simpleType>
    </xs:attribute>
    </xs:schema>
    The sample XML file is as follows
    <?xml version="1.0"?>
    <Emp xsi:noNamespaceSchemaLocation="EMP.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xdb="http://xmlns.oracle.com/xdb">
    <EmpNo>1001</EmpNo>
    <FirstName>William</FirstName>
    <LastName>Don</LastName>
    <EmployeeType>Permanent</EmployeeType>
    <EmpLocation>NewYork</EmpLocation>
    <EmpExperience>10</EmpExperience>
    <WorkHrs Day="Monday" Hrs="8.0"/>
    <WorkHrs Day="Tuesday" Hrs="6.5"/>
    <WorkHrs Day="Wednesday" Hrs="8.5"/>
    <WorkHrs Day="Thursday" Hrs="10.5"/>
    <WorkHrs Day="Friday" Hrs="5.5"/>
    </Emp>
    The Copy Evolve Procedure is as follows (I have added attributes to the above schema definition)
    DECLARE
    SCHEMA_TO_EVOLVE     XDB$STRING_LIST_T;
    NEW_SCHEMA               XMLSEQUENCETYPE;
    OLD_SCHEMA_URL          VARCHAR2(100) := 'EMP.xsd';
    V_NEW_XML_DOC          CLOB := '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" version="1.0" xdb:storeVarrayAsTable="true">
    <xs:element name="Emp" type="EmpType" xdb:defaultTable="EMPLOYEES" xdb:columnProps="CONSTRAINT emp_pk PRIMARY KEY (XMLDATA.EMP_NO)" />
    <xs:complexType name="EmpType" xdb:SQLType="EMPLOYEES_T">
    <xs:sequence>
    <xs:element name="EmpNo" xdb:SQLName="EMP_NO">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="FirstName" xdb:SQLName="FIRST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="LastName" xdb:SQLName="LAST_NAME">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmployeeType" xdb:SQLName="EMPLOYEE_TYPE">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:length value="25"/>
    <xs:enumeration value="Permanent"/>     
    <xs:enumeration value="Consultant"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpLocation" xdb:SQLName="EMP_LOCATION">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="25"/>
    <xs:enumeration value="NewYork"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="EmpExperience" xdb:SQLName="EMP_EXPERIENCE">
    <xs:simpleType>
    <xs:restriction base="xs:positiveInteger">
    <xs:totalDigits value="10"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="WorkHrs" maxOccurs="100" xdb:SQLName="WorkHrs" xdb:propNumber="3280" xdb:global="false" xdb:SQLType="WorkHrs_T" xdb:SQLSchema="APPS" xdb:memType="258" xdb:SQLInline="true" xdb:MemInline="false" xdb:JavaInline="false" xdb:SQLCollType="WORKHRS330_COLL" xdb:SQLCollSchema="APPS">
    <xs:complexType xdb:SQLType="WORKHRS_T" xdb:SQLSchema="APPS">
    <xs:attribute name="Day" xdb:SQLName="DAY" xdb:propNumber="3273" xdb:global="false" xdb:SQLType="VARCHAR2" xdb:memType="2">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="Hrs" xdb:SQLName="HRS" xdb:propNumber="3274" xdb:global="false" xdb:SQLType="NUMBER" xdb:memType="2">
    <xs:simpleType>
    <xs:restriction base="xs:decimal"/>
    </xs:simpleType>
    </xs:attribute>
    </xs:schema>';
    BEGIN
    DBMS_OUTPUT.PUT_LINE('B4 GETTING FILE FROM OS');
    EXECUTE IMMEDIATE 'DROP TABLE EMPLOYEES_TEMP';
    -- Getting file from the file system
    --V_NEW_XML_DOC           := XXTIF_EDI_UTL.GET_CLOB_DOCUMENT('COIL_1.1.xsd','UTF8');
    SCHEMA_TO_EVOLVE     := XDB$STRING_LIST_T(OLD_SCHEMA_URL);
    NEW_SCHEMA           := XMLSEQUENCETYPE(XMLTYPE(V_NEW_XML_DOC));
    DBMS_XMLSCHEMA.COPYEVOLVE(SCHEMA_TO_EVOLVE,NEW_SCHEMA, preserveOldDocs => TRUE, mapTabName => 'EMPLOYEES_TEMP', generateTables => FALSE);
    COMMIT;
    DBMS_OUTPUT.PUT_LINE('SUCCESSFULLY COPIED');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('THE ERROR IS '||SQLERRM);
    END;
    The Table Creation is as follows
    CREATE TABLE EMPLOYEES (XMLDOC XMLTYPE,
                   CREATE_DATE DATE DEFAULT SYSDATE NOT NULL ,
    CONSTRAINT emp_pk PRIMARY KEY (XMLDOC."XMLDATA".EMP_NO)
    XMLTYPE COLUMN XMLDOC STORE AS OBJECT RELATIONAL
    XMLSCHEMA "EMP.xsd" ELEMENT "Emp"
    DECLARE
    TABLENAME VARCHAR2(2000) := 'EMPLOYEES1128';
    BEGIN
    SELECT TEMP_TABNAME
    INTO TABLENAME
    FROM EMPLOYEES_TEMP
    WHERE TABLE_NAME = USER || '.' || UPPER('RELATIE_DOCUMENTEN');
    EXECUTE IMMEDIATE 'INSERT INTO EMPLOYEES(XMLDOC) SELECT XMLTYPE(DATA) FROM ' || TABLENAME;
    COMMIT;
    END;
    When I executed the above SQL, It only populates main data(Perosnal Details such as EmpNo,FirstName,LastName) but not attributes (Workhrs.Day,WOrkhrs.Hrs).
    Please let me know, how can I move those attributes data?
    Again Oracle & XML versions are as follows
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    Oracle XML Database 10.2.0.3.0
    Thanks in Advance.

  • How to create table for XML schema-based Interface form

    Hi All,
    With tcode SFP to crate  a XML schema-based Interface form, how to create a defined table can be listed in "Data View"?
    Just like APAP Dictonary- Based Interface form, that we can drag  a defined table from data view to the panel.

    Hi,
    Just follow these steps:
    1. Create interactive form UI element in your view.
    2. Now provide Datasource and PDFSOURCE to it in form properties.
    3. Now give a template name prefix with 'Z' or 'Y'.
    4. Double click on it. It will prompt for interface name.
    5. Provide interface name prefixed with 'Z' or 'Y'.
    6. Click on Context button in the Pop up window and provide the node you have selected as DATASOURCE.
    7. Click ok and it will open the form designer.
    8. In this way you can create a XML Schema based Form.
    9. Activate the interface and design the form providing layout type and other details.
    Hope it will help.
    Regards,
    Vaibhav

  • Dynamic tables with XML schema binding

    Hello,
    I'm currently fighting a strange issue dealing with a complex dynamic form. This form contains multiple dynamic tables to which the user may add new lines or delete lines that are no longer needed. This is being implemented using the instanceManager and works just fine.
    However, if I try to bind XML based data to this table, it looks like if rows added by the instance manager are always bound to the same record (they all contain identical values). The XML schema is correct, the issue also happens with sample XML data files.
    This seems to have something to do with the programatically added lines, but I have run out of ideas ... Can anyone provide some pointers?
    Thanks a million,
    Steffen.

    Thanks for the reply, Paul.
    I have the question about the schema,
    say i have a table like this:
    Item | Cost
    A   | 10.3
    B   | 21.1
    Total| 31.4
    and my schema is:
    so when I bind the table row should it be $.ItemTable[*].Item ?

  • XMLAGG structure, performance help needed for odd nesting in schema

    Hello,
    I have to produce XML to look like:
    <?xml version='1.0'?>
      <enterprise>
        <membership>
          <sourcedid>
            <id>PHYS_101_001_FA2007</id>
          </sourcedid>
        <!-- NOTE: absence of "members" level tag for XMLAGG! -->
        <member>
          <sourcedid>
            <id>D2LU0001</id>
          </sourcedid>
          <role roletype="Sample Role">
            <status>1</status>
          </role>
        </member>
        <member>
          <sourcedid>
            <id>D2LU0002</id>
          </sourcedid>
          <role roletype="Sample Role">
            <status>1</status>
          </role>
        </member>
      </membership>
    </enterprise>This would be straightforward if the schema allowed for a "<members>" tag under which to nest the <member> tags. But, it does not allow for that tag or any other than those listed above.
    I have a query which does produce that output (except for the roletype attribute), but its performance is horrible; it takes about 40 minutes to return data:
    SELECT
         XMLROOT(
             XMLELEMENT("enterprise",
               XMLAGG(
                 XMLELEMENT("membership",
                   XMLFOREST( XMLELEMENT("id",cx.mapped_course_id) as "sourcedid"
                   (SELECT XMLAGG(
                     XMLELEMENT("member",
                       XMLFOREST(XMLELEMENT("id",spriden_id) AS "sourcedid",
                                 XMLELEMENT("status",'1') AS "role"
                      FROM enrollments_fall_sfrstca efs
                         , spriden sp
                         , gzv_tuid t
                     WHERE sp.spriden_change_ind IS NULL
                       AND sp.spriden_pidm       = t.pidm
                       AND t.tuid                = efs.user_name
                       AND efs.mapped_course_id  = cx.mapped_course_id
                       AND efs.term              = cx.semester
                , VERSION '1.0', STANDALONE NO VALUE)
      FROM courses_xt cx
    WHERE cx.semester = :term_code
    ;Similar queries are producing courses and users XML fine with no performance issues, but these are driven off either the courses view or the enrollments view, but not both.
    Is there some other way I can produce the nesting I need for the vendor's schema?
    The source views are basically as follows (showing relevant columns only):
    courses_xt:
    MAPPED_COURSE_ID       SEMEST
    AVFT209-13307-201210   201210
    AVFT210-13308-201210   201210enrollments_fall_sfrstca:
    MAPPED_COURSE_ID       USER_NAME
    AVFT209-13307-201210    FULLERC8
    AVFT209-13307-201210    SHUPEK
    AVFT209-13307-201210    NOMAN
    AVFT210-13308-201210    SHUPEK
    AVFT210-13308-201210    PELLONMWhen I have the query without the XML (with the subquery as a column of the outer query), this returns the correct data quickly (a couple of minutes).
    I have tried various permutations of XMLFOREST, XMLELEMENT, XMLAGG but either I get syntax errors, or the data is wrong (e.g. repeated '<membership>' for each '<member>', or I have to create an invalid tag '<members>' to be filtered later).
    Please advise!
    Thanks,
    Anita Lees

    Hi Anita,
    Have you tried with a GROUP BY and no subquery?
    Here's an example using SCOTT schema.
    I've used the same tag names and structure so that you can see the analogy :
    SELECT XMLElement("enterprise",
             XMLAgg(
               XMLElement("membership",
                 XMLElement("sourceid", xmlelement("id", d.deptno))
               , XMLAgg(
                   XMLElement("member",
                     XMLElement("sourceid",
                       XMLElement("id", e.empno)
                   , XMLElement("role",
                       XMLAttributes(e.job as "roletype")
                     , XMLElement("status", '1')
    FROM scott.dept d
         LEFT OUTER JOIN scott.emp e ON e.deptno = d.deptno
    WHERE d.deptno IN (10,20)
    GROUP BY d.deptno
    ;which gives :
    <enterprise>
      <membership>
        <sourceid>
          <id>10</id>
        </sourceid>
        <member>
          <sourceid>
            <id>7782</id>
          </sourceid>
          <role roletype="MANAGER">
            <status>1</status>
          </role>
        </member>
        <member>
          <sourceid>
            <id>7934</id>
          </sourceid>
          <role roletype="CLERK">
            <status>1</status>
          </role>
        </member>
        <member>
          <sourceid>
            <id>7839</id>
          </sourceid>
          <role roletype="PRESIDENT">
            <status>1</status>
          </role>
        </member>
      </membership>
      <membership>
        <sourceid>
          <id>20</id>
        </sourceid>
        <member>
          <sourceid>
            <id>7369</id>
          </sourceid>
          <role roletype="CLERK">
            <status>1</status>
          </role>
        </member>
        <member>
          <sourceid>
            <id>7902</id>
          </sourceid>
          <role roletype="ANALYST">
            <status>1</status>
          </role>
        </member>
        <member>
          <sourceid>
            <id>7566</id>
          </sourceid>
          <role roletype="MANAGER">
            <status>1</status>
          </role>
        </member>
      </membership>
    </enterprise>

  • URGENT help needed in creating external xml video plalist. Please help!

    I was given an assignment to  create and external video playlist using an xml file.  I have never used  flash before, know nothing about encoding and all that was given to the  class in terms of instuctions was a short tutorial that has no  resources for troubleshooting.  We were given everything; the external  playlist file equipped with the video skin, the video list, actionscript  that loads the xml and the xml file.  We were told that all we need to  do is change the names of the videos in the xml file to match the names  of our videos.  I did that.  We were also told we needed to "name  target", but we were not informed on how to do this.  I have tried  everything, visited every tutorial and I cannot figure out how to get  this damn thing to work.  I cannot even get flash to load the xml file.  PLEASE HELP.
    Here is the xml file:
    <?xml version = "1.0" encoding = "i-8859-1"?>
    <playlist>
    <ADogWithoutABone
    flvurl="ADogWithoutABone.flv"
    desc="Hyper Wall First Video" />
    <Highway
    flvurl="Highway.flv"
    desc="Hyper Wall Second Video" />
    <PsychoBabble
    flvurl="PsychoBabble.flv"
    desc="Hyper Wall Third Video" />
    <SomethingElse
    flvurl="SomethingElse.flv"
    desc="Hyper Wall Fourth Video" />
    </playlist>
    I tried putting in the entire address of the file location, but it did nothing.
    Here is the actionscript in the flash file:
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    xmlLoader.load(new URLRequest("playlistXML.xml"));
    function xmlLoaded(event:Event):void {
    var playlistXML:XML = new XML(event.target.data);
    var item:XML;
    for each(item in playlistXML.videoname) {
    trace("item: "+item.attribute("flvurl").toXMLString());
    myPlayList.addItem({label:item.attribute("desc").toXMLString(), data:item.attribute("flvurl").toXMLString()});
    //Select the first video
    myPlayList.selectedIndex = 0;
    //And automatically play it
    myPlayScreen.play(myPlayList.selectedItem.data);
    //Add a listener to detect when new video is selected and play it
    function listListener(event:Event) {
    myPlayScreen.play(event.target.selectedItem.data);
    myPlayList.addEventListener(Event.CHANGE, listListener);
    I  tried placing the full address of the xml file in, along with the file  address of the videos, but again it did nothing.  Everything is located  in the same file, and the videos in a sub file in that file. I tried  taking out the sub file and putting all the videos in the same file, but  it did nothing.  I am sure it's something very simple, but like I said I  have NO experience with this whatsoever. I am SO lost and DESPERATELY  need help. PLEASE someone SAVE MEEEE!
    Thanks

    It might be a crossdomain.xml problem.
    Please make sure that the server hosting the xml allows the domain where the swf is hosted.
    You can start with:
    <?xml version="1.0" encoding="utf-8" ?>
    <cross-domain-policy>
        <allow-access-from domain="*"/>
        <site-control permitted-cross-domain-policies="master-only"/>
    </cross-domain-policy>

  • Setting up default toString() in xml schema

    I have an xml schema and xml file that contains info for an app I created. Inside of the app, I load the objects into a combo box for the user to select an item. I want the actual objects in the combo box to access the data directly.
    Because of the nature of the combo box, it uses toString() for the actual display. In this case I have to modify the impl code to add in a toString() function for this to work correctly, and not give me the name of the object.
    Is there away to setup the xsd file to default one the attributes in the xml file to be returned with toString()?
    Example:
      <xsd:element name="JFeatsList" type="JFeatsType"/>
      <xsd:complexType name="JFeatsType">
        <xsd:sequence>
          <xsd:element name="JFeatItem" minOccurs="0" maxOccurs="unbounded">
            <xsd:complexType>
                <xsd:attribute name="FeatName" type="xsd:string"/>
                <xsd:attribute name="FeatType" type="xsd:string"/>
                <xsd:attribute name="Notes" type="xsd:string"/>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
    ...I want the FeatName to be sent back with a toString() call.
    Thanks,
    Mike

    I'm an XML newbie myself, so I've probably just finished reinventing some wheels, but in any case, I've written some code that makes reading XML pretty easy.
    Here are some useful links:
    http://java.sun.com/webservices/docs/1.0/tutorial/index.html
    http://java.sun.com/webservices/download.html
    http://java.sun.com/webservices/downloads/webservicespack.html
    The latter contains C:\jwsdp-1_0_01\samples\jaxp\DOMEcho\DOMEcho.java, which creates a DOM from the XML file, and then traverses the DOM tree. For example, if I want to read the "Company motto" from my XML file:  <GUIconstants>
        <!-- Company motto
        -->
        <MOTTO value=""There's a sucker born every minute!""/>
        <!-- ComboBox mappings; can be any of DatabaseFieldDefinitions (and if you
             really, really, really don't want so many choices, you can completely
             remove the "combo_3" entry, for example).
          0 - ORIGIN_COLUMN       -> Origin airport    (ex. alternative: TIME_COLUMN)
          1 - DESTINATION_COLUMN  -> Destination airport (or: FLIGHT_NUMBER)
          2 - CARRIER_COLUMN      -> Carrier             (or: DAY_COLUMN)
          3 - FOSTERS_BEER_COLUMN -> pROGRAMMING pRODUCTIVITY aID
        -->
        <ComboBox_DatabaseField_Mappings
          combo_0="ORIGIN_COLUMN"
          combo_1="DESTINATION_COLUMN"
          combo_2="CARRIER_COLUMN"
          combo_3="DAY_COLUMN">
        </ComboBox_DatabaseField_Mappings>I have some code like:case Node.ELEMENT_NODE:
      category += "." + node.getNodeName();
      String temp = category;
      if (temp.startsWith(".FBNconfiguration")) {
        temp = temp.substring(".FBNconfiguration".length());
        // FBNconfiguration.GUIconstants
        else if (temp.startsWith(".GUIconstants")) {
          temp = temp.substring(".GUIconstants".length());
          // FBNconfiguration.GUIconstants.MOTTO
          if (temp.equals(".MOTTO"))
            Solitaires.MOTTO = new XMLconversion(node).get(Solitaires.MOTTO);
       * A class to package what's left over
      static class Solitaires {
        static String COMMAND_LINE_OPTIONS;
        static int PORT;
        static String WEEKDAYS;
        static int LOCK_DATABASE;
        static int LOCK_LEASE_DURATION;
        static String MOTTO;
        static int SCROLLPANE_JTABLE_WIDTH_DIFFERENCE;
        static boolean BUG_4736093_WORKAROUND;
      }XMLconversion is a pretty simple class:package suncertify.fbn.xml;
    import org.w3c.dom.*;
    * <p>Title: Fly by Night Travels</p>
    * <p>Description: Sun Certified Java Developer application</p>
    * <p>Copyright: Copyright (c) 2002</p>
    * <p>Company: Fly by Night Consultants</p>
    * @author Thomas Fly
    * @version 1.0
    * Convert a single ("Solitaire") XML entry
    public class XMLconversion {
      String value;
      public XMLconversion(Node node) {
        NamedNodeMap atts = node.getAttributes();
        value = atts.item(0).getNodeValue();
      public XMLconversion(Node node, boolean concatenate) {
        NamedNodeMap atts = node.getAttributes();
        value = "";
        for (int i = 0; i < atts.getLength(); i++) {
          Node att = atts.item(i);
          value += atts.item(i).getNodeValue() + "\n";
      public String get(String dataType) {
        return value;
      public int get(int dataType) {
        return new Integer(value).intValue();
      public boolean get(boolean dataType) {
        return value.equalsIgnoreCase("true");
    }Then in my FBNconstants class, I have stuff like:// GUIconstants
        MOTTO = Solitaires.MOTTO;
        COMBO_CONTENTS = comboBox_DatabaseField_Mappings.COMBO_CONTENTS;By extension, you can read into HashMap's & ArrayList's, and retrieve the translated objects as required.

  • Persist XML Data to Database Table - Generic XML Schema

    Hi,
    I would like to represent data in XML format and persist to any database tables.
    The ideal xml is like:
    <TABLE NAME="TABLE1">
    <TABLEDEF><COLUMN NAME="COLUMN1"/><COLUMN NAME="COLUMN2"/></TABLEDEF>
    <ROW><COLUMN VALUE="value1"/><COLUMN VALUE="value2"/></ROW>
    <ROW><COLUMN VALUE="value11"/><COLUMN VALUE="value22"/></ROW>
    </TABLE>     
    <TABLE NAME="TABLE2">
    </TABLE>     
    The XML could then be parsed, and saved to database with JDBC by manually composing the statement strings.
    To reduce the coding effort (xml parsing, JDBC connection, etc), are there any open source projects available to achieve the above purpose? The popular O/R mapping tools like Hibernate, Castor, etc, can't handle this scanario because they require the knowledge of the tables on the server side in order to create the mapping files in advance.
    Thanks for the help!

    Hi,
    I would like to represent data in XML format and persist to any database tables.
    The ideal xml is like:
    <TABLE NAME="TABLE1">
    <TABLEDEF><COLUMN NAME="COLUMN1"/><COLUMN NAME="COLUMN2"/></TABLEDEF>
    <ROW><COLUMN VALUE="value1"/><COLUMN VALUE="value2"/></ROW>
    <ROW><COLUMN VALUE="value11"/><COLUMN VALUE="value22"/></ROW>
    </TABLE>     
    <TABLE NAME="TABLE2">
    </TABLE>     
    The XML could then be parsed, and saved to database with JDBC by manually composing the statement strings.
    To reduce the coding effort (xml parsing, JDBC connection, etc), are there any open source projects available to achieve the above purpose? The popular O/R mapping tools like Hibernate, Castor, etc, can't handle this scanario because they require the knowledge of the tables on the server side in order to create the mapping files in advance.
    Thanks for the help!

  • Create table from XML schema

    HI,
    is there any possibilty to create a relational table from a XML schema?

    Can you use a schema when we compose XML doc from Database tables?
    Actually, I'm using SQL Server (sorry, wrong forum). But, I thought a Java tool would have a solution for me.

  • Help needed with tables in iWork pages

    Hi,
    When I have a table in microsoft word I can fill it with all the content I like and it will run on page to page.
    In Pages however, a row  (along with the rest of the table below) will split off and start on the next page if threre is too much content.
    If the contents runs over a whole page the text will run on into nowhere, so off the page and the subsquent empty cells will start on the next page.
    How do I stop this from happening?
    Thanks

    That is the way tables in Pages works. It doesn't work as in Word. Do you really need using tables? I myself find it a bad habit when using a table for every thing.

  • Disable XML Validation  (with default table defined in schema)

    Hi,
    Is there a way to disable validations when an XML is put into a XMLType table?
    I have registered my XML as,
    vsql := 'BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => ''ETV_EPG.xsd'',
    SCHEMADOC => bfilename(''MYDIR'',''MY_XSD.xsd''),
    OWNER => ''EPGMANAGER'',
    CSID => nls_charset_id(''AL32UTF8'')
    END;';
    And my XSD has the following,
    <xs:element name="Data" type="ProgramGuide" xdb:defaultTable="MY_TAB" />
    which causes any XML file (which adheres to MY_XSD) which I FTP to Oracle be ingested to MY_TAB.
    However my XSD has several Key and Keyref elements which causes a lot of validations to take place and slows down the ingest. I want to skip those validations as I am confident that the XML conforms to the schema.
    Thanks in advance,
    Vishal

    user5837642 wrote:
    Hi,
    Is there a way to disable validations when an XML is put into a XMLType table?
    I have registered my XML as,
    vsql := 'BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => ''ETV_EPG.xsd'',
    SCHEMADOC => bfilename(''MYDIR'',''MY_XSD.xsd''),
    OWNER => ''EPGMANAGER'',
    CSID => nls_charset_id(''AL32UTF8'')
    END;';
    And my XSD has the following,
    <xs:element name="Data" type="ProgramGuide" xdb:defaultTable="MY_TAB" />
    which causes any XML file (which adheres to MY_XSD) which I FTP to Oracle be ingested to MY_TAB.
    However my XSD has several Key and Keyref elements which causes a lot of validations to take place and slows down the ingest. I want to skip those validations as I am confident that the XML conforms to the schema.
    Are you using Binary storage or Object relational storage? You may want to have a look at this section of the documentation to see if it helps. In particular, you may want to test if using setSchemaValidated() makes any difference.

  • Very urgent help needed- Error while passing XML document to Oracle stored

    Hi !
    I have been struggling a lot to call Oracle 9i stored procedure passing Stringbuilder object type from ASP.NET
    I am using Visual Studio 2008 Professional, OS: Windows XP and Oracle: 9.2.0.1.0
    Following is the procedure:
    CREATE or REPLACE PROCEDURE loadCompanyInfo (clobxml IN clob) IS
    -- Declare a CLOB variable
    ciXML clob;
    BEGIN
    -- Store the Purchase Order XML in the CLOB variable
    ciXML := clobxml;
    -- Insert the Purchase Order XML into an XMLType column
    INSERT INTO companyinfotbl (companyinfo) VALUES (XMLTYPE(ciXML));
    commit;
    --Handle the exceptions
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20101, 'Exception occurred in loadCompanyInfo procedure :'||SQLERRM);
    END loadCompanyInfo ;
    And following is the ASP.net code:
    StringBuilder b = new StringBuilder();
    b.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
    b.Append("<item>");
    b.Append("<price>500</price>");
    b.Append("<description>some item</description>");
    b.Append("<quantity>5</quantity>");
    b.Append("</item>");
    //Here you'll have the Xml as a string
    string myXmlString1 = b.ToString();
    //string result;
    using (OracleConnection objConn = new OracleConnection("Data Source=testdb; User ID=testuser; Password=pwd1"))
    OracleCommand objCmd = new OracleCommand();
    objCmd.Connection = objConn;
    objCmd.CommandText = "loadCompanyInfo";
    objCmd.CommandType = CommandType.StoredProcedure;
    //OracleParameter pmyXmlString1 = new OracleParameter("pmyXmlString1", new OracleString(myXmlString1));
    objCmd.Parameters.Add("myXmlString1", OracleType.clob);
    objCmd.Parameters.Add(myXmlString1).Direction = ParameterDirection.Input;
    //objCmd.Parameters.Add("result", OracleType.VarChar).Direction = ParameterDirection.Output;
    try
    objConn.Open();
    objCmd.ExecuteNonQuery();
    catch (Exception ex)
    Label1.Text = "Exception: {0}" + ex.ToString();
    objConn.Close();
    When I am trying to execute it, I am getting the following error:
    Exception: {0}System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOADCOMPANYINFO' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at Default.Button1Click(Object sender, EventArgs e)
    I understand from this that the .net type is not the correct one, but I am not sure how to correct it. I could not find any proper example in any documentation that I came across. Most of the examples give information on how to read but not how to insert XML into Oracle table by calling Stored Procedure.
    Can you please help me to solve this problem? I hope that you can help solve this.
    Also, can you please give me an example of passing XML document XMLdocument to Oracle Stored procedure.
    In both the cases, if you can provide the working code then it would be of great help.
    Thanks,

    Hi ,
    Additional to the Above error details my BPEL code looks like this:
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>
    Kindly help if anyone has faced this Issue before.
    Regards,
    Rakshitha

  • Help needed in table maintenance

    Dear all
    I have to add a few fields in existing Z-table. When I try to add a field to the table, I get an error that
    Table <table name> is too long (>1962). Can any one guide what's the meaning of this and how to correct the same.
    Thanks in advance. Points for sure.
    Regards
    Dinesh

    Hi,
    The total field lengths of the data elements used in your table is more than 1962, which is the max permissible limit.
    Reduce the length of some of the text fields which you feel is extra and then embed your new field,
    This should solve your problem.
    Hope this helps!!!
    regards,
    Lalit Kabra

Maybe you are looking for

  • Numbers file wont open. please help asap!

    I've been workin on a Numbers file for some days and have always safed it at the end of the day. Today i wanted to open it but i keep on getting this error that it can not be opened. Does anybody know a quick solution to it?

  • Batch File and MaxL Script

    I have a MaxL script that exports level0 data from various cubes. I have a batch file to call that script at daily intervals. I want to name the output something different each day (preferably NAMEmmdd type format). I realize I can add a rename or mo

  • Wireless Connection Trouble - Apple Card Installed

    Hello: I recently installed a 60gb hard drive on this laptop. I reinstalled my Panther OS and upgraded to 10.3.9 . I have verified and repaired my permissions. I am not able to connect to the internet via my apple wireless card. I am using an sbc mod

  • Managing files in Spaces

    OK, Spaces allows me to allocate different apps to a specific space. fine. Now, is there a way to allocate specific FILES only to appear (and be used) in a specific space? Because then, i could allocate all my work related files to my 'Work' Space. o

  • Preview locks files - cannot edit in Photoshop CS6

    Preview has locked all my image files - Even if I use the dropdown menu in the Title bar and change it to unlocked - makes no difference - I still cannot save/save as when I open an image in Photoshop CS6 - it says I  do not have permission, or someo