Importing XML data into sys.XMLType  - encoding problem

Hi,
I'm using "modplsql Gateway" to upload XML file with encoding "windows-1250" with some regional characters in database table.
The table definition:
CREATE TABLE NAHRAJ_DATA (
NAME VARCHAR(128) UNIQUE NOT NULL,
MIME_TYPE VARCHAR(128),
DOC_SIZE NUMBER,
DAD_CHARSET VARCHAR(128),
LAST_UPDATED DATE,
CONTENT_TYPE VARCHAR(128),
CONTENT LONG RAW,
BLOB_CONTENT BLOB
The file was uploaded correct.
My database have
NLS_CHARACTERSET EE8MSWIN1250
NLS_NCHAR_CHARACTERSET AL16UTF16
After upload, I convert data from hex(blob) to dec and with function chr() to char. BLOB -> CLOB.
Next I create sys.XMLType from CLOB. With this progression works all in order.
In other system where are
NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16
BLOB_CONTENT column(table NAHRAJ_DATA) starts with "FF FE FF FE" in HEX before my XML data. Exactly convert is OK, bud if I can create sys.XMLType I get this
ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing
LPX-00200: could not convert from encoding UTF-8 to UCS2 Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
I haven't any idea what's wrong.
Whats mean the HEX code in BLOB_CONTENT column after upload?
Thangs
Lukas

Please post your question in XMLDB forum

Similar Messages

  • Importing XML data into sys.XMLType

    Hi,
    I'm using "modplsql Gateway" to upload XML file with encoding "windows-1250" with some regional characters in database table.
    The table definition:
    CREATE TABLE NAHRAJ_DATA (
    NAME VARCHAR(128) UNIQUE NOT NULL,
    MIME_TYPE VARCHAR(128),
    DOC_SIZE NUMBER,
    DAD_CHARSET VARCHAR(128),
    LAST_UPDATED DATE,
    CONTENT_TYPE VARCHAR(128),
    CONTENT LONG RAW,
    BLOB_CONTENT BLOB
    The file was uploaded correct.
    My database have
    NLS_CHARACTERSET EE8MSWIN1250
    NLS_NCHAR_CHARACTERSET AL16UTF16
    After upload, I convert data from hex(blob) to dec and with function chr() to char. BLOB -> CLOB.
    Next I create sys.XMLType from CLOB. With this progression works all in order.
    In other system where are
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET AL16UTF16
    BLOB_CONTENT column(table NAHRAJ_DATA) starts with "FF FE FF FE" in HEX before my XML data. Exactly convert is OK, bud if I can create sys.XMLType I get this
    ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing
    LPX-00200: could not convert from encoding UTF-8 to UCS2 Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    I haven't any idea what's wrong.
    Whats mean the HEX code in BLOB_CONTENT column after upload?
    Thangs
    Lukas

    Please post your question in XMLDB forum

  • Using importdata to import xml data into dynamic PDF form

    Hi again,
    Me and my colleagues have a problem using the importData service to import some xml data into an empty PDF form (represented as an XFA input variable).
    In the server log I get the error that Only XDP data is supported for XFA forms, however I only have the xml data and not the entire xdp available.
    Is this really not possible to to (like importing xml data to a form is possible in the Designer when creating forms).
    I hope the scenario is understandable
    Sincerely
    Kim Christensen
    Dafolo A/S
    Denmark
    PS: During the various projects I am working on I keep running into problems...however I am totally new to LiveCycle so I consider this very informative learning steps and appreciate all your help :-)

    Hi again,<br /><br />I have been experimenting a little with both the renderPDFForm and importData services. However I don't seem to be ble to make them work as I  need them to.<br /><br />My scenario is simple, I have one (call it a template xdp/PDF form) and lots of data in xml files (around 1000), that I need to import into the template. Therefore I have set up a "Watched Folder" to take the xml as a document (I guess this is a requirement) and then I need either the renderPDF or importData services to import the xml data into the template.<br /><br />I would like to know how I should setup the services to make this work.<br /><br />When I try to use importdata I setup the following:<br /><br />PDF document: set to be the template i need to import the xml to)<br /><br />Input data: the document variable (an xml file) that is passed to the   Watched Folder<br /><br />Data merged PDF: set to an out xfaform<br /><br />When I do this I get an Coercion error in the server log:<br /><br />2007-11-15 13:27:05,324 ERROR [com.adobe.workflow.AWS] stalling action-instance: 1506 with message: ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.<br />     at com.adobe.idp.dsc.util.CoercionUtil.toDOMDocument(CoercionUtil.java:656)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:878)<br />     at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:803)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractDataTypeRuntimeHandler.coerceFrom(Abs tractDataTypeRuntimeHandler.java:64)<br />     at com.adobe.workflow.datatype.runtime.support.AbstractComplexDataTypeRuntimeHandler.getNode (AbstractComplexDataTypeRuntimeHandler.java:47)<br />     at com.adobe.workflow.dom.VariableElement.setBoundValue(VariableElement.java:93)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:729)<br />     at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATEx ecutionContextImpl.java:335)<br />     at com.adobe.idp.workflow.dsc.service.SetValueService.execute(SetValueService.java:46)<br />...<br />Caused by: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document state="passive" senderVersion="3" persistent="false" senderPersistent="true" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.16.10.125" callbackId="0" senderCallbackId="7" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="8039" contentType="application/xml" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGl obalBackendId/><inline><?xml version="1.0" encoding="UTF-8"?><br /><form1><br />  <sub_BlanketTop /><br />  <sub_SubjectTop><br />    <f...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</s enderPullServantJndiName><attributes file="c:\NCRConvert\ProcessForm\stage\Wx450d4b32843a0b0bcb8ef99e\NCR-00564_dXAE3soH.xml"/ ></document> of type: com.adobe.idp.Document to type: interface org.w3c.dom.Document<br />     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)<br />     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)<br /><br />However it is possible to manually import the xml data in Acrobat Professional without any problems.<br /><br />When I use the renderPDFForm with the following settings:<br /><br />Form to render: literal value that points to the template<br /><br />Form data: document variable from watched folder (xml)<br /><br />Content Root URI: repository://<br /><br />With these settings I also get a coercion error, however it does not seem to be exactly the same.<br /><br />Sincerely<br />Kim

  • Split imported XML data into multiple text fields

    I should first describe my final project because it is very possible that I am going about this entirely wrong!
    I am trying to create an interactive PDF file which is the floor plan of our office, when you mouse over the office spaces it would popup the info for the person in that office, in fact when you click on the office space it would show additional info like computer MAC and jack numbers
    I placed the floor plan as a layer and them created a second layer with no fill/no stroke rectangles over the offices and made them buttons (office01, office02)
    I then made text fields with the info for the people, one for regular info and one for extra info (office01-data, office01-Xdata) I made these text fields buttons as well and had them "hidden until triggered"
    These info fields are all on top of one another, as in the are all the same size and in teh same location
    Then I went to the office buttons and created events "On Roll Over" "Show/Hide Buttons and Forms" and changed the visibility of the corresponding info button.
    This works like a charm!
    I hope I am clear up to this point.... my problem now is I would like to import this data both regular and extra from an excel spreadsheet or an XML file.
    That way when we get new staff or people move offices or whatever I can update the spreadsheet or XML file, rerun my InDesign file and create a new interactive PDF
    I have created the XML file
    <staffMap>
         <staff>
              <name>John Doe</name>
              <computerName<gfth56df</computerName>
              <phoneMAC>00:08:00:AB:CD:EF</phoneMAC>
         </staff>
    <staff>
              <name>John Smith</name>
              <computerName<gfth06cb</computerName>
              <phoneMAC>00:08:00:11:22:33</phoneMAC>
         </staff>
    </staffMap>
    Created a new InDesign document
    Imported the XML and placed it in a text field
    saved as a template and closed it
    Reopen and import the XML data again... and it brings it all into the text field... wonderful and useful but not what I need.
    Is it possible to import the XML data into separate test fields, or into some other separate field that I can make into a button and show/hide?
    I may end up just entering all the data directly into InDesign as I know this will work, it just does not seem like the right way to do it.
    Thanking you all in advance 

    I am still looking to get some help with this.
    I would love to know if it is not possible or any ideas at all

  • Import Xml data into Core Data

    Hi im very new here, im trying to find a tutorial to import a xml data into a core data and so i can publish it in a tableview
    Can somebody help me??
    thanks

    Hi,
             If you have already have the xml data then you need to parse the XML data (Using NSXMLParser Class), After parsing the data we need to maintain arrays to store this XML content. After getting the arrays with fully parsed data, you have to store this data in our Local Database (Core Data).  May be it helps for you.
    http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation /Classes/NSXMLParser_Class/Reference/Reference.html

  • Can't import XML data into my databse-connected PDF form

    Hi  All
    Excellent forum, and thanks for all the revealing insights so far viewed, however one question.I'm using a PDF form to collect info via email in the format of XML datafiles. I also have an identical PDF which has database connectivity and that works fine. It was suggested on this forum that I could then import the XML data into my Database via the DB-connected PDF, in effect a user form and one with DB connectivity. Now, I've checked the data types and they all match, but when I import XML file, it creates a blank record in the database and none of the information is carried through. Please could someone offer guidance on what I'm doing wrong, I've been trying to figure this out for a week now?
    Thanks
    Steppe

    Maybe it's because I'm replying by email, so I'll try the forums directly;
    </script>
                </event>
                <assist>
                   <toolTip>Click to delete the current record fromthe database</toolTip>
                   <speak priority="toolTip"/>
                </assist>
             </field>
             <field name="Decam_Done" y="44.45mm" x="165.1mm" w="28.575mm" h="13.707mm">
                <ui>
                   <textEdit>
                      <border>
                         <?templateDesigner StyleID aped3?>
                         <edge stroke="lowered"/>
                      </border>
                      <margin/>
                   </textEdit>
                </ui>
                <font typeface="Myriad Pro"/>
                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
                <para vAlign="middle"/>
                <caption reserve="4.2353mm" placement="top">
                   <font typeface="Myriad Pro"/>
                   <para vAlign="middle"/>
                   <value>
                      <text>Decam_ Done</text>
                   </value>
                </caption>
                <border>
                   <edge/>
                   <corner thickness="0.175mm" join="round" radius="2mm"/>
                </border>
                <bind match="dataRef" ref="$.Decam_Done"/>
                <validate nullTest="error"/>
             </field>
             <?templateDesigner expand 1?></subform>
          <proto/>
          <desc>
             <text name="version">8.2.1.3144.1.471865.466429</text>
          </desc>
          <?templateDesigner expand 1?></subform>
       <?templateDesigner DefaultLanguage FormCalc?>
       <?templateDesigner DefaultRunAt client?>
       <?acrobat JavaScript strictScoping?>
       <?templateDesigner Grid show:0, snap:1, units:0, color:ff8080, origin:(0,0), interval:(125000,125000)?>
       <?templateDesigner FormTargetVersion 26?>
       <?templateDesigner Zoom 75?>
       <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?>
       <?templateDesigner SaveTaggedPDF 1?>
       <?templateDesigner SavePDFWithEmbedded

  • Problems importing XML data into form (Acrobat 8 Pro)

    I created a form in Designer with an email submit button, and now I am receiving XML files by email. I'd like to import these back into the form. But when I open the form and select "import data," I get the following message:
    "This document restricts some Acrobat features to allow for extended eatures in Adobe Reader. To create a copy of the document that is not restricted (and has no extended features in Adobe Reader), click Save a Copy."
    Whether I save it or click cancel, afterwards "import data" is no longer an option. The same thing happens if I try to open the form again in Designer.
    I assume that this is related to having enabled usage rights in Adobe Reader (necessary because the email submit button only works for people who use Microsoft Outlook -- what's up with that?). But dis-enabling these rights for the form doesn't change anything.
    All help appreciated! I'm a novice, so please make it simple.
    Thanks,
    Ted

    If I click "save a copy," then it opens a dialogue box for this. I've been saving this copy under the same name but in a different folder (so as not to screw up my original).
    After saving the file, the "import data" option is no longer available for selection. (Nor is the "Edit Form in Designer" option).
    If I close this and open the newly saved file, then it does give me an "import data" option. But when I try to import an XML file, I always get this error:
    "Xml parsing error: not well-formed (invalid token)(error code 4), line 1, column 5 of file [file path and name]"
    Open for suggestions.
    Thanks,
    Ted

  • Importing XML Data into a Reader Extended PDF

    I'm using designer 9 to create a PDF that will import an XML document on initialization and will use that document to populated multiple dependent dropdown lists.
    That's working fine in preview when I use xfa.datasets.data.mydataset to access the XML document and proceed to manipulate the XML with e4x.
    Now I have the form working correctly in designer preview and I want to reader extend the form and configure the data connection to access the XML file dynamically instead of using the preview data.
    I've tried a few methods of accessing the data via a reader extended form and they have all failed.
    I've tried to call importData("local filename") and access the XML file that way. That appears to fail silently.
    I've also tried to embed the XML in a hidden form field and the XML document length apparently exceeds the max character limit so I can't do that.
    So how can I import the XML document on form initialization either through a) importing the data(ideally through a web URL)  or b) embedding the XML document directly in the form somewhere?  Thanks.

    Hi,
    It's indeed possible to import data in a reader enabled form with Reader.
    Here's a sample:
    LiveCycle Blog: XML per Skript in Adobe Reader importieren//Import XML via Script into Adobe Reader

  • Import XML data into a table

    I am creating a catalog using CS5.5 and need to import datain to a table format. I can import my xml file into a place holder, however, it will not work for my catalog format. I've tried data merge, and that will not work either. I will need the data to be linked so that I can update right before it goes to print. Does anyone know how to create a linked data table? Below is an example of what I am trying to accomplish with each field linked to my data base.
    Part #   
    Desc.   
    Sale  
    SPECIAL BOXED PLUGS   
    843  
    CJ8  
    $1.04  
    844  
    H10C  
    $1.13  
    848  
    CJ8Y  
    $1.13  
    853  
    CJ7Y  
    $1.13  
    855  
    DJ7Y  
    $1.13  
    858  
    CJ6Y  
    $1.13  
    861  
    J19LM  
    $1.16  
    863  
    RCJ8Y  
    $1.39  
    868  
    RJ19LM  
    $1.16  
    71G  
    RC12YC  
    $1.16  

    Get it into an XLS file and turn on linked text (and spreadsheet) files in Preferences, and then File > Place the file.

  • Database automatically imports xml data into pdf - issues

    Hi Guys,
    I have another important question. I have LCD 8.0 where I created a pdf form.
    An Access database should pull information from the XML and import automatically into the pdf file without human interaction.
    The code I am using for importing (which is on the form docready event is: xfa.host.importData("data.xml"); -- but the information is not being automatically filled in, is there a particular syntax for the path? or is there another way to accomplish this?
    Thank you for your help in advance!!!
    Diana

    Are you getting any error messages (check the javascript console - ctrl-j in Acrobat). Did you bind the fields to the inbound XML structure? Look at the Object palette and choose the Binding tab. Have a look at the Data Binding field - is there anything set there?
    Paul

  • How to Import XML file into SAP B1

    Dear All,
    I have a scenario like,
    I am receiving a XML file from a 3rd party application for the daily Creation,Update of Item Master,BP Master, Marketing Documents. I want to import this file into SAP B1 through its approp objects. I understand DTW has limitation in its file types (Semicolo,Tab,Comma,ODBC). How do i do this ? Please guide me.
    Thanks,
    Thanga Raj K

    Hy folks,
    I´m frim Brasil and I've been studying the tool EFM (Eletronic File Manager) to learn more about it!
    There I saw that we can extract to XML "any" infomation from the database we want, mainly through the GEP.
    However, as I've seen, this Add-On can not import any XML file into SBO, unless for the BFP wich can be imported in conjunction with the BTHF Add-on.
    So I ask: how is it possible to import XML data into SBO database? Is it possible to be done through the EFM? or  it´s really necessary to write a code specifically to do that?
    Besides, I know that de B1iSN fit to this necessity... but when I tried to use it, by the custom "object" for BP, for example, there are some data wich the mapping conteined in this custom "process" that can not be imported... I tried to understand how to map those other fields not imported by the custom but this has been dificult to me as I am a implementation consultant focused in administrative process not on development...
    Could you please help me with this subject!
    Thanks a lot,
    Denis

  • Inserting large xml data into xmltype

    Hi all,
    In my project I need to insert very large XML data into xmltype column.
    My table:
    CREATE TABLE TransDetailstblCLOB ( id number, data_xml XMLType) XmlType data_xml STORE AS CLOB;
    I am using JDBC approach to insert values. It works fine for data less than 4000 bytes when using preparedStatement.setString(1, xmlData). As I have to insert large Xml data >4000 bytes I am now using preparedStatement.setClob() methods.
    My code works fine for table which has column declared as CLOB expicitly. But for TransDetailstblCLOB where the column is declared as XMLTYPE and storage option as CLOB I am getting the error : "ORA-01461: can bind a LONG value only for insert into a LONG column".
    This error means that there is a mismatch between my setClob() and column. which means am I not storing in CLOB column.
    I read in Oracle site that
    When you create an XMLType column without any XML schema specification, a hidden CLOB column is automatically created to store the XML data. The XMLType column itself becomes a virtual column over this hidden CLOB column. It is not possible to directly access the CLOB column; however, you can set the storage characteristics for the column using the XMLType storage clause."
    I dont understand its stated here that it is a hidden CLOB column then why not I use setClob()? It worked fine for pure CLOB column (another table) then Why is it giving such error for XMLTYPE table?
    I am struck up with this since 3 days. Can anyone help me please?
    My code snippet:
    query = "INSERT INTO po_xml_tab VALUES (?,XMLType(?)) ";
              //query = "INSERT INTO test VALUES (?,?) ";
         // Get the statement Object
         pstmt =(OraclePreparedStatement) conn.prepareStatement(query);
         // pstmt = conn.prepareStatement(query);
         //xmlData="test";
    //      If the temporary CLOB has not yet been created, create new
         temporaryClob = oracle.sql.CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
         // Open the temporary CLOB in readwrite mode to enable writing
         temporaryClob.open(CLOB.MODE_READWRITE);
         log.debug("tempClob opened"+"size bef writing data"+"length "+temporaryClob.getLength()+
                   "buffer size "+temporaryClob.getBufferSize()+"chunk size "+temporaryClob.getChunkSize());
         OutputStream out = temporaryClob.getAsciiOutputStream();
         InputStream in = new StringBufferInputStream(xmlData);
    int length = -1;
    int wrote = 0;
    int chunkSize = temporaryClob.getChunkSize();
    chunkSize=xmlData.length();
    byte[] buf = new byte[chunkSize];
    while ((length = in.read(buf)) != -1) {
    out.write(buf, 0, length);
    wrote += length;
    temporaryClob.setBytes(buf);
    log.debug("Wrote lenght"+wrote);
         // Bind this CLOB with the prepared Statement
         pstmt.setInt(1,100);
         pstmt.setStringForClob(2, xmlData);
         int i =pstmt.executeUpdate();
         if (i == 1) {
         log.debug("Record Successfully inserted!");
         }

    try this, in adodb works:
    declare poXML CLOB;
    BEGIN
    poXML := '<OIDS><OID>large text</OID></OIDS>';
    UPDATE a_po_xml_tab set podoc=XMLType(poXML) WHERE poid = 102;
    END;

  • Xml Data into Table Within an Oracle Database

    With no oracle or database background, I have been tasked to figure out how to analyze reading values within xml files. I initially started by writing c# code to read through the xml files, pull out the values I need and summarize the results. Unfortunately, this took atleast 5 hours to open all the xml files and summarize the results for a small portion of EndPointChannelId's and xml files. I decided to store all the reading values within the xml files into a table so I can use SQL queries to do the analysis instead of having to process through all the files each time. Using the same c# code as before, I have used insert and update sql statements to insert the reading values into a table. To my dismay, it takes about 3 and a half hours to import 1 file where there is 20 files a day :S. There are over 19,000 ChannelID's per file. I am currently using SQL Developer to view the data and have noticed XML Schemas and XML DB Repository but am not sure if that would be the best approach to my problem. I need to increase the efficiency of the import process but I am having difficulties trying to figure out how to go about it. Do you have any suggestions on where I should go from here? What is the most efficient way you have used to import xml files into a table structure. I would greatly appreciate any ideas!
    Below is a portion of the xml file that I am working with.
    - <Channel ReadingsInPulse="false" IsRegister="false" IsReadingDecoded="true" MarketType="Electric" IntervalLength="60">
    <ChannelID EndPointChannelID="57432:1" />
    - <ContiguousIntervalSets>
    - <ContiguousIntervalSet NumberOfReadings="6">
    <TimePeriod EndRead="22467.80" EndTime="2013-05-09T13:00:00Z" StartTime="2013-05-09T07:00:00Z" />
    - <Readings>
    <Reading Value="0.31" />
    <Reading Value="0.4" />
    <Reading Value="0.16" />
    <Reading Value="0.32" />
    <Reading Value="0.09" />
    <Reading Value="0.35" />
    </Readings>
    </ContiguousIntervalSet>
    </ContiguousIntervalSets>
    </Channel>

    Hi,
    Welcome to the forums,
    what i understand from your Post, You want to read/analyze some value from xml files. and for this you want to import it in database and then perform some Query on that file for easy work.
    you can choose the External table concept for reading/ Query those files
    check this link may it help you
    Creation of External table by using XML files.
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables013.htm

  • Steps to insert xml data into oracle

    Please give me next steps to insert xml data into oracle 9i:
    i've been doing this steps :
    1. create folder in oracle port:8080
    2. copy xsd into folder
    3. register schema
    4. Give me next step...
    5.
    6.
    Thanks

    this is my complete xmlschema
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
         <xs:element name = "A3A8Vers" type = "xs:string"/>
         <xs:element name = "F1F5Vers" type = "xs:string">
         </xs:element>
         <xs:element name = "sequence" type = "xs:string">
         </xs:element>
         <xs:element name = "amf" type = "xs:string">
         </xs:element>
         <xs:element name = "trnsKeyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "mac" type = "xs:string">
         </xs:element>
         <xs:element name = "encryptionKey" type = "xs:string">
         </xs:element>
         <xs:element name = "signature" type = "xs:string">
         </xs:element>
         <xs:element name = "signer">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "keyNumber"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "entityNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "keyNumber" type = "xs:string">
         </xs:element>
         <xs:element name = "pblKey">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "entityNumber"/>
                        <xs:element ref = "entityRole"/>
                        <xs:element ref = "keyNumber"/>
                        <xs:element ref = "publicKeyVal"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "ntrTime" type = "xs:string">
         </xs:element>
         <xs:element name = "deActionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "actionTime" type = "xs:string">
         </xs:element>
         <xs:element name = "entityRole">
              <xs:complexType>
                   <xs:attribute name = "role" default = "INVALID">
                        <xs:simpleType>
                             <xs:restriction base = "xs:NMTOKEN">
                                  <xs:enumeration value = "TKD"/>
                                  <xs:enumeration value = "SKD"/>
                                  <xs:enumeration value = "INVALID"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:attribute>
              </xs:complexType>
         </xs:element>
         <xs:element name = "publicKeyVal">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref = "exponent"/>
                        <xs:element ref = "mod"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name = "exponent" type = "xs:string">
         </xs:element>
         <xs:element name = "mod" type = "xs:string">
         </xs:element>
         <xs:element name = "encriptionTransKey" type = "xs:string">
         </xs:element>
         <xs:element name = "keyType" type = "xs:string">
         </xs:element>
    </xs:schema>.
    I use command to create table :
    create table elements of xmltype
    xmlschema "http://192.168.1.1:8080/test.xsd"
    element "publicKey"
    . But why the result,table as object type. so i cant use command "desc <table_name>;"

  • Loading XML Data into Relational Table

    Hello,
    I receive an XML file generated from another tool (on Windows), I am trying to create a Linux shell script that will gather the needed XML file from my Linux database server, then have Oracle use this file to load the XML data into a relational table. This activity & data will be needed on an ongoing basis.
    I have tried this two ways. First, I loaded the XML document into the database and tried to extract the data directly from the document, but that is not working. Now I want to try to read the data directly from the file on the server via select, however I am not getting any data returned. In the Select statement below, I am simply trying to query the data to see what is returned for my testing.
    Create Table ci_results_table (transactionID Varchar2(100), //transactionID should be PrimaryKey but was getting NULL value errors during insert test, so removed PK
    message Varchar2(200),
    ci Varchar2(50),
    processeddate xmltype,
    status Varchar2(50),
    sourcefile VarChar2(100));
    select x.*
    from XMLTable(
         'TSPLoadResults/Results'
         PASSING xmltype(bfilename('CMDB_DEVADHOCRESULTS_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('AL32UTF8'))
         COLUMNS
           transactionID Varchar2(100) PATH 'TransactionID',
           Result XMLType PATH 'Result',
           Message Varchar2(200) PATH 'Message',
           PrimaryKey Varchar2(50) PATH 'PrimaryKey',
           ProcessedDate date PATH 'ProcessedDate',
           Status Varchar2(50) PATH 'Status',
           SourceFile VarChar2(100) PATH 'SourceFileName'
       ) x
    Eventually I will need to build on this to limit the data returned to those records where SourceFileName is like 'HPDS%' and insert what is returned in to the ci_results_table. Attached is a sample Results XML file I am trying to load, It is named "ResultsTransformedtoUnix" because I used dos2Unix to convert it to Unix which may be right or wrong. (The output file I send out has to be transformed to DOS format before the other application can read it). Original file (before Unix conversion) named in script is also attached.
    Please help. Thank you!

    Hi,
    I see some wrong things in your query.
    1) The obvious one, explaining why you're not getting any data : there's a typo in the XQuery expression, it's "Result" not "Results"
    2) ProcessedDate cannot be extracted as a date (at least not directly) since it actually represents a timestamp, use TIMESTAMP WITH TIME ZONE datatype and cast back to DATE in the SELECT clause
    3) transactionID is an attribute, it must be accessed with '@' (or 'attribute::' axis)
    4) If the file encoding is truly ISO-8859-1 as the prolog suggests, then do not use AL32UTF8 but the corresponding charset name : WE8ISO8859P1
    Here's the working query :
    select x.transactionID
         , x.Message
         , x.Primarykey
         , cast(x.ProcessedDate as date) ProcessDate
         , x.Status
         , x.SourceFile
    from XMLTable(
           '/TSPLoadResults/Result'
           PASSING xmltype(bfilename('XML_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('WE8ISO8859P1'))
           COLUMNS
             transactionID Varchar2(100)            PATH '@transactionID',
             Message       Varchar2(200)            PATH 'Message',
             PrimaryKey    Varchar2(50)             PATH 'PrimaryKey',
             ProcessedDate timestamp with time zone PATH 'ProcessedDate',
             Status        Varchar2(50)             PATH 'Status',
             SourceFile    VarChar2(100)            PATH 'SourceFileName'
         ) x
    Using this query directly over the file will only perform decently (for large files) on 11.2.0.4 and onwards.
    On prior versions, first load the file in a (temporary) XMLType column with Binary XML storage and SELECT from there.
    because I used dos2Unix to convert it to Unix which may be right or wrong.
    This conversion shouldn't be necessary.

Maybe you are looking for

  • Is there a way to view and print a single month.....

    without the partial previous and partial following months? I'd like be able to view and print, for example, just August, without seeing the last few days of July and the first few days of September. Thanks.

  • Where can i get a 45 Degree angle adapter for the laptop end of the G6 power supply.

    I am annoyed by the power cord sticking out at 90 Deg from the right side of my G6 Notebook . the plug obstructs the usb mouse and i am looking for a 45 Degree adapter to solve this problem. If HP make one of these then where / what site can i get it

  • SQL *PLUS issue

    I have an unusual problem in SQL PLUS. When the SQL statement is a DML things go fine - no problem, BUT when the SQL statement is a DDL (like creating a database object )the process hangs. Things get more interesting ... if I open another SQL PLUS se

  • Blue line or blue frame appears and icons do not function ?

    When I boot up my Stream 7 tablet a blue line appears on the screen. If I try to tap an icon, the selection does not function? If I click an icon or a place on the start up screen I blue line seem to frame the area and nothing will function? I did fo

  • Can Quicktime Updates interfere with saved iMovie projects?

    Hello. I'm just about to do an update to the latest Quicktime and I wondered if these updates can cause any problems with iMovie projects that have been made and saved on my computer with older Quicktime versions? Thanks Rich