XML Schema -- xsi:null in document instance and nullable in XSD

Hi,
I have an XML document
<DOC>
<EMP_ID>1</EMP_ID>
<EMP_NAME>Scott</EMP_NAME>
<EMP_ADDRESS>USA</EMP_ADDRESS>
</DOC>
As to what I understand, for the document to look like
<DOC>
<EMP_ID>1</EMP_ID>
<EMP_NAME>Scott</EMP_NAME>
<EMP_ADDRESS></EMP_ADDRESS>
</DOC>
with no value in <EMP_ADDRESS> tag, I have to use nullable attribute in XSD and xsi:null attribute in document. Is there any other way where we don't make any modificaitons in the document

Hi, Thanks for the reply.I have a scenario like this :
1. We have lot of xml files in our application server ( size ranges form 2 MB to 200 MB).
2. We have xml schema based structured storage for a column "personjoininfo" for a relational table --- Table is :
CREATE TABLE PERSON_COMP_TABLE
empId VARCHAR2(100) CONSTRAINT pk_PERSONCOMP PRIMARY KEY
,comments VARCHAR2(20)
,joindate DATE
,personjoininfo xmltype
XMLTYPE COLUMN personjoininfo XMLSCHEMA "www.PersonInfoUrl.com" element "person"
3. What is the best option for me to load the xml files in the personjoin info column along with the other column values.
As I know , if I use the XML DIR ( directory feature ), I would need to put these xml files in the database server for loading ---
So, what are my options in this scenario for loading these xml files ?
Thanks

Similar Messages

  • Updated xml schema not reflected in Import Manager and Syndicator

    Hi all,
    We have a perfectly running MDM scenario using custom XML schema for import and syndication. I have now updated the schema by adding a couple of fields to the schema and uploaded the new schema to MDM using Console - Admin - XML Schemas, and we have added the same fields in the repository. However, when I open Import Manager or Syndicator the xml schema is not updated, it is still showing the old version without the new fields. The fields added to the repository show up just fine.
    I have searched around the forum and it suggests I actually have to re-create manually all mappings with the new schema?! I cannot believe this is really necessary and would mean massive amounts of work.
    I have tried to export old maps and create new map with new schema. Then the new fields show up, but when I import the previously exported map the old schema returns and the new fields disappear.
    Any help with this seemingly very odd behavior is very much appreciated!
    Thanks,
    Kenneth

    Hi Kenneth, Aamir
    the statement
    > Uploading the XML schema in Console is mainly a placeholder, it not not synced with Import Manager or Syndicator schema at runtime.
    is not completely true. You have to differentiate the MDM version and the tools:
    MDM 7.1 Import Manager: uses the actual XSD of MDM Console
    MDM 7.1 Syndicator: stores the XSD as part of the map and disregards the one in MDM Console
    MDM 5.5 Import Manager: stores the XSD as part of the map and disregards the one in MDM Console
    MDM 5.5 Syndicator: stores the XSD as part of the map and disregards the one in MDM Console
    Best regards
    Michael

  • OLEDB Dataconnection and XML Schema

    Hi,
    I create a form with fields binding with a OLEDB dataconnection.
    It's work, I can request my database and store my data.
    I want to be able to can access these field in a process (with workbench ES).
    If I bind fields with a xml schema I can access to them and manipulate them but I can't bind them with a OLEDB dataconnection and a xml schema.
    How can I do this ?
    Thank you and I hope you could understand me :D

    Yes, I have a DB but I am already working with the XML file. The Data Connection that I am using has this config:<br /><br />XML Schema<br />Schema file: contents.xsd<br />Options: <contents>, no checkboxes activated<br /><br />My solution is supposed to run online in a LAMP env, when the user clicks a Print Button, I run a script to generate the XML from the DB, and then I open a new page with the PDF form that I've built in LC Designer (8.0) with the generated data. I don't need data navigation, it's a summary report that will be printed.<br /><br />So, while developing, I've saved a populated XML locally and keep trying to open the PDF file with the data without success. Same if I save the 3 files (xsd, xml and pdf form) in the server and try to open the PDF through browser. But, as I said before, when previewing it in LC, I see the form exactly as I want.<br />I did what you mentioned (import data in Adobe Reader), and it worked partially, since the repeating row just showed one record.<br /><br />As I can see, I need some kind of script in the PDF form that, when it's loaded, the data (XML file) is imported. By now, I am trying to do it locally and think this should work. Then, for the online solution, I thought that I would need something running on the server, and based on what you said, I will need LC Forms, is that correct?<br /><br />Hope things are clearer now. Answering to your question, my form is binded globally. The repeating row is connected (Default Binding) to > $record.content[*] < and each field in the row connected to an item from the XSD definition. No Import/Export Bindings in use.<br /><br />Thanks for the help so far! :)

  • Standard XML schema for Vendor data exchange between SAP and other system

    Is there a SAP standard way of XML schema that we exchange between SAP and other system? Please let me know.
    Thanks.

    See SAP Interface Repository (http://ifr.sap.com).
    My proposal is to leave old SAP connectors staff and use SAP Exchange Infrastructure. There is a support of industry XML standards in XI 3.0 like xCBL.

  • Xml schema different between Dev and QA

    The XML schemas are different between our DEV and QA systems after applying XI stack 13/SRM stack 10. It may be that they were different before applying the stacks but it has only been spotted in testing. We need to find out why before we live with the SP stack into production.
    We have re-applied the XI content tpz files to both the DEV and QA servers and can't see any differences between in the design time repository apart from between the generated XML schemas:
    A simple example of the difference is included below. The difference
    only seem to be in the SRM Server 5.5 content and seems to be to do with the hierarchies in the header declaration with xmlns:p0="http://sap.com/xi/SRM/Basis/Global" being in a different position in Dev than in QA. I have raised an OSS message but have been waiting for 2 1/2 days now for a response and we are due to go live with the patching in a weeks time. Any help steering me in the right direction would be most appreciated.
    Dev:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:p0="http://sap.com/xi/SRM/Basis/Global"
    xmlns="http://sap.com/xi/SAPGlobal/Global"
    targetNamespace="http://sap.com/xi/SAPGlobal/Global">
    <xsd:import namespace="http://sap.com/xi/SRM/Basis/Global" />
    <xsd:element name="PurchaseOrderRequest"
    type="p0:PurchaseOrderMessage" />
    </xsd:schema>
    QA:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://sap.com/xi/SAPGlobal/Global"
    targetNamespace="http://sap.com/xi/SAPGlobal/Global">
    <xsd:import namespace="http://sap.com/xi/SRM/Basis/Global" />
    <xsd:element xmlns:p0="http://sap.com/xi/SRM/Basis/Global"
    name="PurchaseOrderRequest" type="p0:PurchaseOrderMessage" />
    </xsd:schema>
    Many thanks
    Ian

    Like I have mentioned in my reply yesterday to your another post, I am very positive that the role you are looking at in your QA system is the role "Accessible Content Administration".
    Please verify your role assignment and make sure that you have the correct roles assigned.
    Thanks,
    Shanti

  • I am trying to register the xml schema and getting error

    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-1998.dtd'),
    5 CSID => nls_charset_id('AL32UTF8'));
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00247: invalid Document Type Declaration (DTD)
    Error at line 45
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    the xml i am trying to register is
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd">
    <metadata>
    <idinfo>
    <citation>
    <citeinfo>
    <origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    etc.
    Pls help me in registering the xml schema.

    I am registering fgdc-std-001-1998-sect01.xsd, but it is
    giving error about citeinfo element.XSD is
    <?xml version="1.0" encoding="utf-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://www.ascc.net/xml/schematron" blockDefault="#all">
    <xsd:element name="idinfo" type="idinfoType"/>
    <xsd:complexType name="idinfoType">
         <xsd:sequence>
              <xsd:element ref="citation"/>
              <xsd:element ref="descript"/>
              <xsd:element ref="timeperd"/>
              <xsd:element ref="status"/>
              <xsd:element ref="spdom"/>
              <xsd:element ref="keywords"/>
              <xsd:element ref="accconst"/>
              <xsd:element ref="useconst"/>
              <xsd:element ref="ptcontac" minOccurs="0"/>
              <xsd:element ref="browse" minOccurs="0" maxOccurs="unbounded"/>
              <xsd:element ref="datacred" minOccurs="0"/>
              <xsd:element ref="secinfo" minOccurs="0"/>
              <xsd:element ref="native" minOccurs="0"/>
              <xsd:element ref="crossref" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="citation" type="citationType"/>
    <xsd:complexType name="citationType">
         <xsd:sequence>
              <xsd:element ref="citeinfo"/>
         </xsd:sequence>
    </xsd:complexType>
    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'fgdc-std-001-1998-sect01.xsd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-1998-sect01.xsd'),
    5 LOCAL => TRUE,
    6 GENTYPES => TRUE,
    7 genbean => FALSE,
    8 GENTABLES => FALSE,
    9 force => False,
    10 CSID => nls_charset_id('UTF8'));
    11 END;
    12 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00021: undefined element "citeinfo"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    I am unable to understand xsd, is there any manual to understand
    xsd or some literature.I need to create new xsd as per requirements
    also.But Pl could you help me right now with registering current xsd.

  • JAXP API provides no way to enable XML Schema validation mode

    I am evaluating XDK 9.2.0.5.0 for Java and have encountered another
    problem with XML Schema support when using the JAXP API.
    Using the classes in oracle.xml.jaxp.*, it appears to be impossible to
    enable XML Schema validation mode. I can set the schema object, but
    the parser does not use it for validation.
    If I use DOMParser directly, I can call the setValidationMode(int)
    method to turn on schema validation mode. There is no equivalient
    means to enable XML Schema validation when using the JAXP API.
    Test case for JAXP API:
    === begin OracleJAXPSchemaTest.java ======
    package dfranklin;
    import java.io.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    public class OracleJAXPSchemaTest
    private final static String xsd = ""
    +"<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:dfranklin:test\">"
    +" <xsd:element name=\"amount\" type=\"xsd:integer\"/>"
    +"</xsd:schema>";
    private final static String xml =
    "<amount xmlns=\"urn:dfranklin:test\">1</amount>";
    public static void main(String[] args)
    throws Exception
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
              "oracle.xml.jaxp.JXDocumentBuilderFactory");
    new OracleJAXPSchemaTest().run();
    public void run()
    throws Exception
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(true);
    dbf.setNamespaceAware(true);
    XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
    dbf.setAttribute("oracle.xml.parser.XMLParser.SchemaObject",
              xmlSchema);
    DocumentBuilder docbldr = dbf.newDocumentBuilder();
    Document doc = docbldr.parse(new InputSource(new StringReader(xml)));
    print(doc);
    private XMLSchema buildXMLSchema(Reader xsdin)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    private void print(Document doc)
    throws
    javax.xml.transform.TransformerConfigurationException,
    javax.xml.transform.TransformerException
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(new DOMSource(doc), new StreamResult(System.out));
    System.out.println();
    === end OracleJAXPSchemaTest.java ======
    Running that program:
    java dfranklin.OracleJAXPSchemaTest
    produces this output
    Exception in thread "main" oracle.xml.parser.v2.XMLParseException: Element 'amount' used but not declared.
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:148)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:269)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
    at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:96)
    at dfranklin.OracleJAXPSchemaTest.run(OracleJAXPSchemaTest.java:40)
    at dfranklin.OracleJAXPSchemaTest.main(OracleJAXPSchemaTest.java:27)
    This shows that the parser is not using the XML Schema to validate the
    document. I think it's expecting to find a DTD.
    Here is the equivalent program using DOMParser directly, and setting
    validation mode to SCHEMA_VALIDATION.
    === begin OracleParserTest.java ====
    package dfranklin;
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLParser;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    public class OracleParserTest
    private final static String xsd = ""
    +"<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:dfranklin:test\">"
    +" <xsd:element name=\"amount\" type=\"xsd:integer\"/>"
    +"</xsd:schema>";
    private final static String xml =
    "<amount xmlns=\"urn:dfranklin:test\">1</amount>";
    public static void main(String[] args)
    throws Exception
    new OracleParserTest().run();
    public void run()
    throws Exception
    DOMParser dp = new DOMParser();
    XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
    dp.setXMLSchema(xmlSchema);
    dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    dp.parse(new InputSource(new StringReader(xml)));
    Document doc = dp.getDocument();
    print(doc);
    private XMLSchema buildXMLSchema(Reader xsdin)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    private void print(Document doc)
    throws
    javax.xml.transform.TransformerConfigurationException,
    javax.xml.transform.TransformerException
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(new DOMSource(doc), new StreamResult(System.out));
    System.out.println();
    === end OracleParserTest.java ====
    Running that program
    java dfranklin.OracleParserTest
    produces this output
    <?xml version = '1.0'?>
    <amount xmlns="urn:dfranklin:test">1</amount>
    In this case, the parser has validated the document.
    I also tried this with version 10.1.0.0.0 beta, and got the same
    error.
    Darin Franklin

    Thanks for posting that. I tried that code and still got my problem. The big difference is that I'm reading a group of XML files each of which uses a large number of schema files. There are over 50 schema files organized so they can be included as needed. Each of the XML files has a noNamespaceSchemaLocation attribute specifying one of the ten top schma files, that includes many others.
    However, I did solve the problem. I added one line --
           saxb.setFeature( "http://apache.org/xml/features/validation/schema",
                    true);
            // next line is new
            saxb.setProperty( JAXPConstants.JAXP_SCHEMA_LANGUAGE,
                    JAXPConstants.W3C_XML_SCHEMA );after the setFeature to turn on schema validation.
    (It needs an import org.apache.xerces.jaxp.JAXPConstants; statement.)
    Note:With the feature set to true and the setProperty commented out, the EntityResolver is called at construction tiem, and for each schema file, but each element is flagged as needing to be declared.
    With the feature commented out, and the setProperty in place, the EntityResolver is not called, and there is no validation performed. (I added invalid content to one of the files and there were no errors listed.)
    With both the setFeature and the setProperty in place, however, I get the calls from the EntityResolver indicating that it is processing the schema files, and for the good files, I get no errror, but for the bad file, I get an error indicating a bad validation.
    Now I can make the EntityResolver quiet and get what I wanted. Maybe there are other ways to do this, but I've got one that works. :-)
    Thanks to all who have helped.
    Dave Patterson

  • XML Schema Component Naming Convention

    Is there a naming convention when you create an XML Schema? For example,
    When you create a Type component, then the first letter of its name should be upper case ie. BMW, Honda, AutombileEngine ...etc.
    When you create an Element component, then the first letter of its name is lowercase ie. engine, car, guestCar ..etc.
    Do we have such naming convention for XML Schema?
    Thanks

    I am giving this from my document which i prepared for one of my customer
    2     General Guidelines for design of XML schema documents
    The representation of data in an XML format will be a key component of development within SOA. Therefore, the design and development of XML schemas should be as rigorous an activity as designing and developing code or designing database schemas. As such, when creating an XML schema you should be working within a development process and working to a set of design guidelines and coding standards (when writing the XML schema file). XML schemas should be reviewed for accuracy and compliance with guidelines and standards. Each of the requirements in the list below is a general requirement for all XML schemas to be deployed in the SOA environment.
    •     Understandable: XML schemas should be clear, consistent and unambiguous. They should contain human readable documentation and, where appropriate, links to requirements or design documents.
    •     Semantically Complete: An XML schema should define, for one or more target XML documents, each and every element and attribute that is understood by your solution when processing target documents.
    •     Constraining: XML schemas are used as contracts between both publisher and consumer. As such, they must be able to be validated as concisely as possible. When designing an XML schema constraints should be identified for the values for all the elements and attributes that the application uses and relies on to the set of values that the application can handle. A valid document should imply valid data within the limits of what can be specified by the XML Schema language.
    •     Uniquely identifiable: XML schemas should import and include other XML schema files rather than duplicating types and elements locally.
    •     Reusable: XML schemas should be specified in such a way that types and other XML schemas can leverage elements. Every type defined in an XML schema that is the content type of an attribute or an element should be defined globally (i.e., at the top level in the Schema). Types that are defined globally can be reused in other XML schemas. Schemas should be separated into logical sections which can be included into the main schema file.
    •     Extensible: Schemas should be designed to be extensible—that is, new elements and attributes can be inserted throughout the document.
    Every schema should use at least two namespaces – the targetNamespace and the XML Schema (http://www.w3.org/2001/XMLSchema) namespace.
    Create typed elements that can be referred to by object elements:
    Example:
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.soa.com"
    xmlns="http://www.soai.com"
    elementFormDefault="qualified">
    <xsd:complexType name="PersonType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="SSN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.company.org"
    xmlns="http://www.company.org"
    elementFormDefault="qualified">
    <xsd:include schemaLocation="Person.xsd"/>
    <xsd:include schemaLocation="Product.xsd"/>
    <xsd:element name="Company">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Person" type="PersonType" maxOccurs="unbounded"/>
    <xsd:element name="Product" type="ProductType" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    •     Recognize that with XML Schemas you will not be able to express all your business rules.
    o     Express those business rules using XSLT.
    •     Use type definitions
    Elements vs Attributes
    •     Use attributes for metadata about the parent element.
    •     Use attributes for data that is semantically tied to the enclosing element.
    •     Use elements for data that have a meaning separate from the enclosing element.
    •     Use attributes when the value will be frequently present in order to improve the human readable form of an XML instance document or reduce its size.
    •     If you don't know which to use, then use the element form (which is more extensible).
    2.1.1     Element, Types and attribute names
    Create a descriptive name without it being excessively long (no more than 32 characters).
    Elements and Types should be named in Upper Camel Case. Upper Camel Case capitalizes the first character of each word and compounds the name (remove all whitespace).
    Attributes should be named in Lower Camel Case. Lower Camel Case capitalizes the first character of each word except the first word and compounds the name.
    Simple and Complex type names
    XML Schema has separate symbol space for elements and types so they may have the same name. The best practice is to append the word "Type" to all simple and complex type names to aid in human readability and comprehension.
    Element, attribute and type names MUST be in a singular form unless the concept itself is plural.
    2.1.1.1     XML Schema versioning
    Use major and minor version tracking:
    Major—completely different structure and semantics, most likely not backward compatible
    Minor—backward compatible changes which introduce new features without removing or changing the semantics of existing structures
    2.1.1.2     Indication of version in the namespace URI
    Specify a namespace URI as follows
    http://$domain/$groupSpecifier/$namespaceTitle/$version
    The groupSpecifier can include several levels, e.g., /www.soa.com/SOA/USA/.
    An example namespace could be:
    http://www.soa.com/SOA/order/2

  • Xml schema Vs DTD

    Hi,
    Can some one please give me a pointer or elaborated detail regarding how using xml schema helps instead of using DTDs and the most popular and efficient tool out there that converts DTDs into XSDs? I know there is some inforamtion about this in W3C documents, anything more consice than the W3C documents will help.
    Thanks,

    usermolak wrote:
    Can some one please give me a pointer or elaborated detail regarding how using xml schema helps instead of using DTDs Check this out:
    Oracle® XML DB Developer's Guide - How DTDs and XML Schema Differ
    and the most popular and efficient tool out there that converts DTDs into XSDs?
    I use Altova XML Spy. This editor is used in many examples in the Oracle Documentation.
    Cheers,
    Mihajlo

  • How to fix "ORA-31038:Invalid value ..." in a XML schema

    Hello,
    We are in 11gR2 :
    select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionWe load XML files based on a registered XML schema.
    Here is the top of our XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:xdb="http://xmlns.oracle.com/xdb"
             xmlns="http://www.capgemini.com/xsd/projet.xsd"
             targetNamespace="http://www.capgemini.com/xsd/projet.xsd"
             elementFormDefault="unqualified"
             blockDefault="#all">
      <xsd:element name="WORKBENCH_PROJECT" xdb:defaultTable="WORKBENCH_PROJECT_TABLE">
        <xsd:complexType xdb:maintainDOM="false">
          <xsd:sequence>
            <xsd:element ref="BaseCalendars"/>
            <xsd:element ref="PoolResources"/>
            <xsd:element ref="Projects"/>
          </xsd:sequence>
    ...We experience error ORA-31038: Invalid number value ... at the load of the XML, when the focus goes to a string type attribute :
    Here it is :
            <Task
              UID="AJ\&apos;UF`2=_```)O0H;&quot;P!```?P```0" earlyStart="2010-04-20T08:00:00" category="Run"
              baseTime="2010-03-26T09:22:00" lateStart="2010-04-20T08:00:00" start="2010-04-20T08:00:00"
              proxy="false" earlyFinish="2010-05-12T17:00:00" lateFinish="2010-05-12T17:00:00"
              critical="true" status="2" shortName="OASIS 3.2" outlineLevel="4" baseFinish="2010-06-11T17:00:00"
              finish="2010-05-12T17:00:00" summary="false" baseStart="2010-05-17T08:00:00" baselineDuration="20.0"
              milestone="false" name="OASI 3.2.1 : Association d&apos;un plan à un PFO" fixed="true"
              locked="false" key="false" percComp="1.0" totalSlack="0.0" unplanned="false">
              <Assignments>
                <Assignment
                  status="2" actualWork="24.0" resourceID="SMOUFLIH" start="2010-04-20T08:00:00" baselineWork="0.0"
    Here is the XML schema part where the load fails ( at the attribute *<xsd:attribute name="name" type="xsd:string"/>* ) :
      <xsd:element name="Task" xdb:defaultTable="">
        <xsd:complexType xdb:maintainDOM="false">
          <xsd:sequence>
            <xsd:element ref="Assignments" minOccurs="0"/>
            <xsd:element ref="BaselineDetails" minOccurs="0"/>
            <xsd:element ref="Constraints" minOccurs="0"/>
            <xsd:element ref="Notes" minOccurs="0"/>
          </xsd:sequence>
          <xsd:attribute name="UID"/>
          <xsd:attribute name="taskID" type="xsd:string"/>
          <xsd:attribute name="baseFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baseStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baseTime" type="xsd:NMTOKEN"/>
          <xsd:attribute name="baselineDuration" type="xsd:decimal"/>
          <xsd:attribute name="category" type="xsd:string"/>
          <xsd:attribute name="critical" type="xsd:string"/>
          <xsd:attribute name="earlyFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="earlyStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="finish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="fixed" type="xsd:string"/>
          <xsd:attribute name="guidelines" type="xsd:string"/>
          <xsd:attribute name="key" type="xsd:string"/>
          <xsd:attribute name="lastUpdatedBy" type="xsd:string"/>
          <xsd:attribute name="lastUpdatedDate" type="xsd:NMTOKEN"/>
          <xsd:attribute name="lateFinish" type="xsd:NMTOKEN"/>
          <xsd:attribute name="lateStart" type="xsd:NMTOKEN"/>
          <xsd:attribute name="locked" type="xsd:string"/>
          <xsd:attribute name="methodID" type="xsd:string"/>
          <xsd:attribute name="milestone" type="xsd:string"/>
          <xsd:attribute name="name" type="xsd:string"/>
          <xsd:attribute name="outlineLevel" type="xsd:integer"/>
          <xsd:attribute name="percComp" type="xsd:decimal"/>
          <xsd:attribute name="priority" type="xsd:string"/>
          <xsd:attribute name="proxy" type="xsd:string"/>
          <xsd:attribute name="shortName" type="xsd:string"/>
          <xsd:attribute name="start" type="xsd:NMTOKEN"/>
          <xsd:attribute name="status" type="xsd:integer"/>
          <xsd:attribute name="summary" type="xsd:string"/>
          <xsd:attribute name="totalSlack" type="xsd:double"/>
          <xsd:attribute name="unplanned" type="xsd:string"/>
          <xsd:attribute name="userText1" type="xsd:string"/>
          <xsd:attribute name="userText2" type="xsd:string"/>
          <xsd:attribute name="userText3" type="xsd:string"/>
          <xsd:attribute name="userText4" type="xsd:string"/>
          <xsd:attribute name="userText5" type="xsd:string"/>
      We know how to fix it manually :
    The workaround is to :
    remove all "&apos;" in each attribute called "name" But we suppose we need to amend the XML schema with a proper change. And we don't know how to do this.
    The weird is that we've never noticed this error earlier on a 11gR1 DB... This error only occurs on our brand new 11.2.0.2
    I hope it's clear enough for your understanding.
    Do you have any advice ?
    Thanks in advance,
    Olivier

    What are your NLS Settings
    SQL> select *
      2  from nls_database_parameters
      3  where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
    PARAMETER                                SQL> select *
      2  from nls_database_parameters
      3  where parameter in ('NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');
    PARAMETER                    VALUE
    NLS_LANGUAGE              AMERICAN
    NLS_TERRITORY             AMERICA
    NLS_CHARACTERSET       AL32UTF8
    SQL>With my settings I do not see a problem with a cut-down test...
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/oracle as sysdba
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> def USERNAME = CG
    SQL> --
    SQL> def PASSWORD = &USERNAME
    SQL> --
    SQL> -- def XMLDIR = &1
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user CG cascade
    User dropped.
    Elapsed: 00:00:01.72
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to CG identified by CG
    Grant succeeded.
    Elapsed: 00:00:00.01
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user CG default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.01
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> -- create or replace directory XMLDIR as '&XMLDIR'
    SQL> -- /
    SQL> var SCHEMAURL1    varchar2(256)
    SQL> VAR XMLSCHEMA1    CLOB;
    SQL> VAR INSTANCE1     CLOB;
    SQL> --
    SQL> set define off
    SQL> --
    SQL> alter session set events='31098 trace name context forever'
      2  /
    Session altered.
    Elapsed: 00:00:00.00
    SQL> begin
      2    :SCHEMAURL1:= 'http://xmlns.example.com/testcase.xsd';
      3    :XMLSCHEMA1 :=
      4  '<?xml version="1.0" encoding="UTF-8"?>
      5  <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified" attributeFormDefault="unqualified">
      6     <xsd:element name="Task" xdb:defaultTable="TASK_TABLE">
      7      <xsd:complexType xdb:maintainDOM="false">
      8        <xsd:sequence>
      9          <xsd:element name="Notes" type="xsd:string" minOccurs="0"/>
    10        </xsd:sequence>
    11        <xsd:attribute name="UID"/>
    12        <xsd:attribute name="taskID" type="xsd:string"/>
    13        <xsd:attribute name="baseFinish" type="xsd:NMTOKEN"/>
    14        <xsd:attribute name="baseStart" type="xsd:NMTOKEN"/>
    15        <xsd:attribute name="baseTime" type="xsd:NMTOKEN"/>
    16        <xsd:attribute name="baselineDuration" type="xsd:decimal"/>
    17        <xsd:attribute name="category" type="xsd:string"/>
    18        <xsd:attribute name="critical" type="xsd:string"/>
    19        <xsd:attribute name="earlyFinish" type="xsd:NMTOKEN"/>
    20        <xsd:attribute name="earlyStart" type="xsd:NMTOKEN"/>
    21        <xsd:attribute name="finish" type="xsd:NMTOKEN"/>
    22        <xsd:attribute name="fixed" type="xsd:string"/>
    23        <xsd:attribute name="guidelines" type="xsd:string"/>
    24        <xsd:attribute name="key" type="xsd:string"/>
    25        <xsd:attribute name="lastUpdatedBy" type="xsd:string"/>
    26        <xsd:attribute name="lastUpdatedDate" type="xsd:NMTOKEN"/>
    27        <xsd:attribute name="lateFinish" type="xsd:NMTOKEN"/>
    28        <xsd:attribute name="lateStart" type="xsd:NMTOKEN"/>
    29        <xsd:attribute name="locked" type="xsd:string"/>
    30        <xsd:attribute name="methodID" type="xsd:string"/>
    31        <xsd:attribute name="milestone" type="xsd:string"/>
    32        <xsd:attribute name="name" type="xsd:string"/>
    33        <xsd:attribute name="outlineLevel" type="xsd:integer"/>
    34        <xsd:attribute name="percComp" type="xsd:decimal"/>
    35        <xsd:attribute name="priority" type="xsd:string"/>
    36        <xsd:attribute name="proxy" type="xsd:string"/>
    37        <xsd:attribute name="shortName" type="xsd:string"/>
    38        <xsd:attribute name="start" type="xsd:NMTOKEN"/>
    39        <xsd:attribute name="status" type="xsd:integer"/>
    40        <xsd:attribute name="summary" type="xsd:string"/>
    41        <xsd:attribute name="totalSlack" type="xsd:double"/>
    42        <xsd:attribute name="unplanned" type="xsd:string"/>
    43        <xsd:attribute name="userText1" type="xsd:string"/>
    44        <xsd:attribute name="userText2" type="xsd:string"/>
    45        <xsd:attribute name="userText3" type="xsd:string"/>
    46        <xsd:attribute name="userText4" type="xsd:string"/>
    47        <xsd:attribute name="userText5" type="xsd:string"/>
    48             </xsd:complexType>
    49     </xsd:element>
    50  </xsd:schema>';
    51    :INSTANCE1 :=
    52  '<Task
    53            UID="AJ\&apos;UF`2=_```)O0H;&quot;P!```?P```0" earlyStart="2010-04-20T08:00:00" category="Run"
    54            baseTime="2010-03-26T09:22:00" lateStart="2010-04-20T08:00:00" start="2010-04-20T08:00:00"
    55            proxy="false" earlyFinish="2010-05-12T17:00:00" lateFinish="2010-05-12T17:00:00"
    56            critical="true" status="2" shortName="OASIS 3.2" outlineLevel="4" baseFinish="2010-06-11T17:00:00"
    57            finish="2010-05-12T17:00:00" summary="false" baseStart="2010-05-17T08:00:00" baselineDuration="20.0"
    58            milestone="false" name="OASI 3.2.1 : Association d&apos;un plan A  un PFO" fixed="true"
    59            locked="false" key="false" percComp="1.0" totalSlack="0.0" unplanned="false"/>';
    60  end;
    61  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> set define on
    SQL> --
    SQL> declare
      2    V_XML_SCHEMA xmlType := XMLType(:XMLSCHEMA1);
      3  begin
      4    DBMS_XMLSCHEMA.registerSchema
      5    (
      6      SCHEMAURL        => :SCHEMAURL1,
      7      SCHEMADOC        => V_XML_SCHEMA,
      8      LOCAL            => TRUE,
      9      GENBEAN          => FALSE,
    10      GENTYPES         => TRUE,
    11      GENTABLES        => TRUE,
    12      ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    13    );
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.46
    SQL> desc TASK_TABLE
    Name                                      Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "http://xmlns.example.com/testcase.xsd" Element "Task") STORAGE Object-relational TYPE "Task3632_T"
    SQL> --
    SQL> insert into TASK_TABLE values ( XMLTYPE(:INSTANCE1))
      2  /
    1 row created.
    Elapsed: 00:00:00.01
    SQL> commit
      2  /
    Commit complete.
    Elapsed: 00:00:00.09and am able to extract the value of the name attribute correct
    SQL> select XMLCAST(XMLQUERY('/Task/@name' passing OBJECT_VALUE returning content) as VARCHAR2(64))
      2    from TASK_TABLE
      3  /
    XMLCAST(XMLQUERY('/TASK/@NAME'PASSINGOBJECT_VALUERETURNINGCONTEN
    OASI 3.2.1 : Association d'un plan A  un PFO
    Elapsed: 00:00:00.00Could you try this simplied test in your database...
    Edited by: mdrake on Nov 30, 2010 8:36 PM

  • Generate XML from XML-Schema

    What possibilities do I have to generate an XML-Instance from the XML-Schema?
    I heard of JAXB and Castor, that generate Classes for acessing XML-Information and genarating XML-files and I heard of Sun's XML-Generator, a command line tool.
    Does anybody know other possibilities?

    i use XMP Spy for converting XML schema to an instance file. it works fine.

  • Urgent: Help required for fetching CHILDNODE from an XML schema.

    Hi All,
    Good Morning to all, i have problem in extracting the child node name. I have created a xml schema say "emrxmlsample3.xsd" based on this schema i have created a xmltype table and inserted a value to the table. I have a problem in fetching the "CHILDNODE" name. Kindly help me in solving this problem. Here by i am posting all the workings i have done...
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/emrxmlsample3.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/emrxmlsample3.xsd"
    xmlns:samp="http://www.oradev.com/emrxmlsample3.xsd"
    version="1.0">
         <element name="HISTORY">
              <complexType>
                   <sequence>
                        <element name="HPI">
                             <complexType>
                                  <sequence>
                                       <element name = "PAIN">
                                            <complexType>
                                                 <sequence>
                                                      <element name = "SET">
                                                           <complexType>
                                                                <sequence>
                                                                     <element name = "LOCATION">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "HEAD" type = "string"/>
                                                                                    <element name = "NECK" type = "string"/>
                                                                                    <element name = "BACK" type = "string"/>                                                       
                                                                                    <element name = "CHEST" type = "string"/>                                                       
                                                                                    <element name = "ABDOMEN" type = "string"/>     
                                                                                    <element name = "JOINTS" type = "string"/>     
                                                                                    <element name = "OTHERS" type = "string"/>
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>
                                                                     <element name = "SEVERITY">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "MILD" type = "string"/>
                                                                                    <element name = "MODERATE" type = "string"/>
                                                                                    <element name = "SEVERE" type = "string"/>                                                       
                                                                                    <element name = "VERYSEVERE" type = "string"/>                                                       
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>     
                                                                     <element name = "CHARACTER">
                                                                          <complexType>
                                                                               <sequence>
                                                                                    <element name = "DIFFUSE" type = "string"/>
                                                                                    <element name = "PRICKING" type = "string"/>
                                                                                    <element name = "CUTTING" type = "string"/>                                                       
                                                                                    <element name = "PIERCING" type = "string"/>                                                       
                                                                               </sequence>
                                                                          </complexType>
                                                                     </element>                                                                      
                                                                </sequence>
                                                           </complexType>      
                                                      </element>
                                                 </sequence>     
                                            </complexType>
                                       </element>
                                  </sequence>
                             </complexType>
                        </element>
                   </sequence>
              </complexType>
         </element>
         </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsemr3 (
    id number, CHIPSEMR XmlType)
    XMLTYPE CHIPSEMR STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/emrxmlsample3.xsd"
    ELEMENT "HISTORY";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsemr3 VALUES(1,
    xmltype.createxml('<?xml version="1.0"?>
    <samp:HISTORY xmlns:samp="http://www.oradev.com/emrxmlsample3.xsd" >
              <HPI>
                   <PAIN>
                        <SET>
                             <LOCATION>
                                  <HEAD> YES </HEAD>
                                  <NECK> NO </NECK>
                                  <BACK> N </BACK>
                                  <CHEST> N </CHEST>
                                  <ABDOMEN> N </ABDOMEN>
                                  <JOINTS> N </JOINTS>
                                  <OTHERS> N </OTHERS>
                             </LOCATION>
                             <SEVERITY>
                                  <MILD> N </MILD>
                                  <MODERATE> N </MODERATE>
                                  <SEVERE> N </SEVERE>
                                  <VERYSEVERE> N </VERYSEVERE>
                             </SEVERITY>
                             <CHARACTER>
                                  <DIFFUSE> N </DIFFUSE>
                                  <PRICKING> N </PRICKING>
                                  <CUTTING> N </CUTTING>
                                  <PIERCING> N </PIERCING>
                             </CHARACTER>
                        </SET>
                   </PAIN>
              </HPI>
    </samp:HISTORY>'));
    To show the Root Node Name:
    1. Query
    select x.CHIPSEMR.getrootelement() CHIPSNODES from chipsemr3 x, table(xmlsequence(x.CHIPSEMR.extract('//node()'))) x
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.

    Hi,
    I'm not sure what you want actually.
    You can get all elements names with :
    SELECT value(x).getRootElement() chipsnodes
    FROM chipsemr3 t,
         TABLE(
           XMLSequence(
             Extract(t.chipsemr, '//*')
         ) x
    ;or, starting with 10.2 :
    SELECT x.*
    FROM chipsemr3 t,
         XMLTable(
          'for $i in //* return local-name($i)'
          passing t.chipsemr
          columns chipsnode varchar2(30) path '.'
         ) x
    ;

  • XML Schema based XMLType column leaves file open on error

    Hello,
    I have the following situation on both oracle 10.1.0.2.0 and 10.1.0.4.0:
    insert into xml_products (xmlfile) values(bfilename(file_loc, char_id));
    "xmlfile" is a xmltype column based on a registered xml schema.
    When the file fails xml schema validation, the file remains open and I cannot move it until i close the session.
    Is this a bug or an "intentional feature"?
    Any workarounds?
    Thanks,
    Flavio

    All right Mark,
    thanks for your reply.
    Meanwhile I fixed the problem and posted my workaround here:
    http://oraclequirks.blogspot.com/2005/11/ora-29292-and-xmltype.html
    Bye,
    Flavio

  • How to Update an XML schema..

    Hi All,
    I am new to XML concept. I have a requirement to create a xml schema which will be updated on a weekly basis and a table which associated to the created xml schema.. when ever the Schema is updated the table should not get affected.. Is there a way to solve my problem.. Kindly help me.
    I am using the following client:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 31 11:44:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ////////////////////////////////// XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/chipsxml1.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/chipsxml1.xsd"
    xmlns:samp="http://www.oradev.com/chipsxml1.xsd"
    version="1.0">
    <element name="HICC">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
         <element name="SSI">
              <complexType>
              <sequence>
              <element name = "S01" type = "string"/>
              <element name = "S02" type = "string"/>
              <element name = "S02A" type = "string"/>
              <element name = "S02B" type = "string"/>
              <element name = "S02C" type = "string"/>          
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    ////////////////////////// Table which has multiple Column //////////////////////////
    CREATE TABLE chipsxmltable2 (
    id number, HICCXMLDATA XmlType)
    XMLTYPE HICCXMLDATA STORE AS OBJECT RELATIONAL
    XMLSCHEMA "http://www.oradev.com/chipsxml1.xsd"
    ELEMENT "HICC";
    ///////////////////////////////// Insert Query in chipsxmltable //////////////////////////
    INSERT INTO chipsxmltable2 VALUES(1,
    xmltype.createxml('<?xml version="1.0"?>
    <samp:HICC xmlns:samp="http://www.oradev.com/chipsxml1.xsd" >
    <UTI>
    <U01>No</U01>
    <U02>Y</U02>
    <U03>Y</U03>
    <U03a>Y</U03a>
    <U03b>Y</U03b>
    <U03c>Y</U03c>     
    <U04>Y</U04>
    <U05>Y</U05>          
    </UTI>
    <SSI>
    <S01>No</S01>
    <S02>Y</S02>
    <S02A>Y</S02A>
    <S02B>Y</S02B>
    <S02C>Y</S02C>
    </SSI>
    </samp:HICC>'));
    //////// This is my Revised XML Schema ///////////////////////
    begin
    dbms_xmlschema.registerSchema(
    'http://www.oradev.com/Rchipsxml1.xsd',
    '<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.oradev.com/Rchipsxml1.xsd"
    xmlns:samp="http://www.oradev.com/Rchipsxml1.xsd"
    version="1.0">
    <element name="HICC">
    <complexType>
    <sequence>
         <element name="UTI">
              <complexType>
              <sequence>
              <element name = "U01" type = "string"/>
              <element name = "U02" type = "string"/>
              <element name = "U03" type = "string"/>
              <element name = "U03a" type = "string"/>
              <element name = "U03b" type = "string"/>
              <element name = "U03c" type = "string"/>          
              <element name = "U04" type = "string"/>                    
              <element name = "U05" type = "string"/>                    
              </sequence>
              </complexType>
         </element>
    </sequence>
    </complexType>
    </element>
    </schema>',
    TRUE, TRUE, FALSE, FALSE);
    end;
    My question is:
    How to update schema without affecting my table and the data which has already in the table?
    Apologies if the description is not clear. Kindly let me know if further details are needed. Many thanks for your help.
    Very best regards,
    Godwin Jebakumar C.V.
    Thanks in advance,
    Godwin Jebakumar

    Duplicate thread : {thread:id=2171878}
    Please mark this one as "answered".

  • Getting document instance from NSPersistentDocument?

    I'm still fairly new to Objective C and programming in general, so if my question is inane please forgive me.
    Here is what I'm stuck on. I'm currently working on an Cocoa desktop app that uses NSPersistentDocument. I currently have a view controller that manages a modal window. I would like to save to the ManagedObjectContext in one of that view controller's methods. According to Apple's documentation on Core Data"
    "The context is in effect also your gateway to the rest of the Core Data infrastructure. As such, it is expected that you either keep a reference to the context, or you have a means of easily retrieving it—for example, if you are developing a document-based application that uses NSPersistentDocument, you can use the document class’s managedObjectContext method."
    and elsewhere
    "Where a managed object context comes from is entirely application-dependent. In a Cocoa document-based application using NSPersistentDocument, the persistent document typically creates the context, and gives you access to it through the managedObjectContext method."
    and finally
    "Getting a Managed Object Context
    In OS X:
    In an single-coordinator applications, you can get the application’s context directly from the application delegate.
    In document-based applications, you can get the context directly from the document instance."
    I think I'm missing the bigger picture here. My questions is... what is the document instance and how do I access it from other classes? This method in my modal view controller:
    " - (IBAction)saveContext:id)sender {
    if ([tagsArray count] != 0) {
        int objectcount;
        for (objectcount = 0; objectcount < [tagsArray count]; objectcount ++){
            Tag *singleTag = (Tag *) [NSEntityDescription insertNewObjectForEntityForName:@"Tag" inManagedObjectContext:self.managedObjectContext];
            singleTag.tagname = [tagsArray objectAtIndex:objectcount];
            singleTag.video = selectedFile;
            NSLog(@"Tagnames %@",singleTag.tagname);
    [NSApp stopModalWithCode:NSOKButton];
    [self.window close];
    Gives me a "No known class method for selector 'managedObjectContext' compiler warning. Actually any method I try to call on the Document class gives the same warning. Something tells me the document instance is NOT called by "Document" because it's talking about a class method, but I have no clue what I should put in it's place. FWIW making an additional managedObjectContext in the view controller does not work as NSPersistentDocument does not allow more than one. I tried declaring "document" as a property in the view controller like this:
    @property (strong) Document *docController;
    But that's creating a new instance of the Document class rather than referencing the pre-existing one. The context is not getting saved because it's deallocated as soon as the window is closed. Obviously I'm thinking about this the wrong way. There isn't much info out there on core-data & document based apps. Can someone help me with this? I've been stuck on this for quite a while now and am desparate for help.
    Thanks.

    hi,
    i think, that's not possible in that way you expect it.
    the only idea, i have, is to use the jvmpi interface.
    if you write your own profiler using jvmpi, your java program
    will reach a c or c++ dll-function JVM_OnLoad().
    There you have an instance of the java vm.
    but still you are a thread of the vm.
    How to pass it to a diffrent process ?
    maybe via a variable which is shared by the dll with
    another process.

Maybe you are looking for

  • Converting Multipule Reqs to a Purchase Order with Delivery Schedule Lines

    Is it possible to convert a multiple Purchase Reqs for the same items to a PO that has one line but multipule deliver dates in the Schedule lines - Where the Purchase Reqs have been generated by MRP Example I have an SAP Contract 46***** that runs vi

  • PLEASE HELP ME: Pink/Purple library everytime I open Itunes.

    I have no idea what I did. I have re-installed Itunes, Restarted my computer, and still my library is pink & purple. This is true for all of my libraries, including playlists & the white parts of the Itunes Store. Its all Pink & Purple. The rest of m

  • JWSDP xws-security validation of expired certificate

    I'm using JWSDP 1.6, in SecurityEnvironmentHandler (server side) I have > if (callbacks[i] instanceof CertificateValidationCallback) {                     CertificateValidationCallback cb = (CertificateValidationCallback) callbacks;                  

  • Cant get iMovie08 to show all photos that are in iphoto.

    Can't get iMovie08 to show all photos that are in iphoto. only shows about 30, when there are actually about 60 or so in one album. any ideals?

  • Satellite L55-A5299 Hard Disk Problem

    My laptop  has a pop-up saying Windows detected a hard disk problem, I have already backed up my stuff. I also did a complete restore of the laptop and that still didn't make it go away. What do I have to do?