DTD, Python, TEI, and Berkeley DB XML

Dear experts BDB XML,

I'm developing a web application (Django database) which uses python to manipulate and search documents TEI based in a BDB XML container.

I'm loading in the container XML documents contain a reference to an external DTD, which in turn refers to the .ent files. The documents contain references to entity requiring a resolution.

I can successfully XML documents in the container, if I include the content of the DTD in each file, but the process will fail if I do not understand the content of the DTD of the XML document and instead try to make reference to the DTD via a reference. XQuery queries also do not seem to work properly if the DTD content is included in each XML document.

I found references in forums in the following JAVA code that appears to allow the BDB XML in the file system of the database to refer to an external DTD (I could be wrong on that though):

XmlManagerConfig config = new XmlManagerConfig();
config.setAllowExternalAccess (true);
Manager of XmlManager = new XmlManager (config);

My query is, can even be achieved using python? Documentation of BDB specifies this as a single operation of JAVA and does not mention possible using python.

Thanks for reading
AL

Hi AL,.

I have gathered some experience with Python bindings now, but I was not exactly in your situation. My experience has been pretty much everything you can do in Java you can do this in Python, but sometimes the syntax is a little different. I see Python doesn't have a XmlManagerConfig class but rather indicators given in the XmlManager constructor used. To do what you want to do, I think you want (assuming that of dbxml import *)

mgr = XmlManager(env, DBXML_ALLOW_EXTERNAL_ACCESS)

Tags: Database

Similar Questions

  • Is Berkeley DB XML 'death '.

    After enjoying the beautiful doc on XQuery Update, https://docs.oracle.com/cd/E17276_01/html/gsg_xml/cxx/modifydocument.html, I checked what the latest material was and am surprised that there is no update more.

    Is any activity (development) yet in this area, Berkeley DB XML (or docs update also)?

    Sincerely,

    Marco

    Berkeley DB XML is always being updated and published, although admitted quite slowly.  The latest version 6.0.17, was released a few months ago.

    Lauren Foutz

  • How to validate and transform large xml files (180 M)

    Hello:

    I was looking at different ways to do it with oracle and am a bit lost in the sea of the documentation and the different ways to go about this. I was hoping that something like the XMLParser and XMLTransform class would be smart enough to handle large files using SAX, when it takes, but I'm getting "too many knots" when attempting to transform a very large file. (I've gotten oraxsl to cope if I pass in the parameters memory clean on the command line but a) which will always limits and b) I tried to do it in a procedure stored that (I think) means I'm looking at XMLParser?

    I also seen documentation on what is called 'Scalable DOM' but I think it's only in 11g? So I think that I have to write a (Java?) procedure to make a loop on the main elements of this XML file stored (select extract (...)), and then transform each node?

    I have the XML, XSD, XSLT and while clob columns. What is the easy/more shortest path within Oracle to validate the XML with the xsd and translate source XML with XSL?

    I use Oracle 10 g on Linux RH 2.

    Thank you.

    I have the XML, XSD, XSLT and while clob columns.

    The complexity is the transformation?

    It is perhaps interesting to try and store your documents as object-relational XML, to create relational views and apply the transformation using XQuery or SQL/XML functions.

  • Berkeley DB XML license

    Dear Sirs!

    We plan to develop a WCF service to work with Berkley DB.

    We want to provide our customers with:
    1 Berkeley Db XML (with source code)
    2. our service WCF (with source code) (new BSD)
    3 WCF client (closed source), that uses the WCF service.

    Will there be any violations in this case (Open Source License agreement)?

    Please help to resolve the issue.

    Hello
    License information Oracle Berkeley DB can be found at:
    http://www.Oracle.com/technetwork/database/BerkeleyDB/downloads/licensing-098979.html

    This link provides a follow-up to other licensing questions email address:
    [email protected]

    Thank you
    Sandra

  • the tag of 'mode' in the editable using getconfig() and setconfig() vhost.xml file?

    the tag of 'mode' in the editable using getconfig() and setconfig() vhost.xml file?

    Use the same code I gave before, simply replace:

    admin_nc. Call ("setConfig2", new Result1 (), "Proxy/Mode", "remote", "Adaptor:_defaultRoot_ / VHost:_defaultVHost_");

    by

    admin_nc. Call ("getConfig2", new Result1 (), "Proxy/Mode", "Adaptor:_defaultRoot_ / VHost:_defaultVHost_");

    Redefine Result1() as:

    function Result1() {}

    this.onResult = {function (info)}

    If (info.code == "NetConnection.Call.Success") {}

    for {(i in info.data)

    trace (info. Data [i]);

    }

    }

    }

    }

  • Issue of Python API and profile of Stimulus

    Hello

    I am using IronPython with Visual Studio 2010 to create automated tests of a PXI system I have. Most of my knowledge API (and Python) so far has been coming to this thread of Iron Python . Although very useful. I am not able to get the parts of profile of Stimulus work. I have command over the line, forcing the acquisition of basic data output voltage, but I was hoping that use the far more high-level control provide by VeriStand.

    My methodology so far has been 1) create a profile of Stimulus in the Editor (something simple like a shifted sine wave) 2) I do not specify a specific channel in the profile (because I want to use the same waveform on several channels, in order) 3) record 4) Point the Python script to the sinewave.nivstest of the file Run 5). Is there something wrong with this process?

    The problem is that 'running' is really doing nothing. I'll have to study this more within my reach, but the result is something (it begins almost at work!) but for something that should be hard about 20 seconds, it ends immediately after the first 'blip '.

    I use Iron Python 2.7, VS 2010 Shell. If it's important for some reason, I use a custom material OR and card FPGA DAQ. And I would say force SetChannelValue (X) works for all outputs.

    Thank you very much!

    It's probably because you're playing a stimulus that has no mapping. The same thing happens if you specify a mapping in the profile?

    Unfortunately, there is no API in NI VeriStand in 2010 to change the mapping. So that's all that you specify when you create with the GUI. However, the nivstest file is actually just XML so that you can use any XML parsing and API for editing to change the mapping. If you don't want to use an API for XML editing, you can try to use the technique in the VI posted on this thread to change the mapping.

  • DTD for data-management-config. XML

    Is due to the structure of data-management - config.xml file somewhere? I wonder why this file (as well as all other FDS config files) is not validated against a DTD or XML schema?
    I am trying to configure several parameters for a method of destination server, so far without success. Subsequent attempts have failed

    < Server >
    < fill method - >
    < name > getFolderContent < / name >
    java.lang.String; boolean < params > < / params >
    < / fill method >
    < / Server >

    < Server >
    < fill method - >
    < name > getFolderContent < / name >
    < params > java.lang.String, boolean < / params >
    < / fill method >
    < / Server >

    < Server >
    < fill method - >
    < name > getFolderContent < / name >
    java.lang.String < params > < / params >
    < params > Boolean < / params >
    < / fill method >
    < / Server >

    I want to pass a Java string and a Boolean (primitive). What is the correct syntax? Thank you.

    I think you need something like this: java.lang.Boolean, java.lang.String

  • Allow "Flatten XML" and "Unflatten from XML" to work without access to the internet.

    Hi all

    In my program, I use the XML Unflatten and flatten XML screw. On my development computer, everything works fine. As soon as I put it in the production environment, it has stopped working. I reduced to doing in my production environment, there is no internet access and I'll be never able/allowed to have access to the internet there.

    Someone at - it an elegant way to solve this problem? (By "elegant" I do not want to manually change all of the .xml files that I produce to include the path to the local LVXMLSchema.xsd) Is there a file .manifest or .config can we change to point my program compiled to the xsd on the right file? Perhaps another method?

    Thank you!

    Kind regards

    Filip.

    Hi all

    I think I found the solution.

    In the end, it wasn't an Internet. It was the inclusion of the classes in the compiled code or not.

    Attention! It was not enough just uncheck everything in the "Additional Exclusions" section of the building. I actually had instantiate each class possible, which can be converted by the "XML Unflatten" in the .vi. I even tried to put the lvclasses in the always include the article of the source of the build. This no longer works.

    Thanks for all your suggestions guys!

    Kind regards

    Filip.

  • LabVIEW crashes again and again THAT XML performance Associates screws

    I use LV 2009 SP1 and have worked for several days and nights on a XML parser.

    The code uses a lot of recursive algorithms and everything was tested yesterday and worked OK.

    Continued work today, all of the code yesterday still worked up to a point in time (no id why) it just stopped, LV hangs and crashes then momentarely.

    Boost LV, open code, run only an associated XML VI and I blocked again...

    When LV falls down, its CPU usage is close to 0% and the memory usage about 128 MB of RAM (by default) so nothing fancy there.

    It seems that the parser XML of LV is dead? I tried to locate the source of the accident, but every time I think "this must be it" by isolating part of the code, blocking something else - but still associated with XML.

    I was happy to see that the work is progressing, and now I have come to a stopping point.

    I'm now 'fix' LV via Add/Remove Programs console. No idea if this will do anything.

    I must say that I have LV8.6.1 and LV2009SP1 installed together. I haven't opened that one version of LV at the time, and for this project, I'm under LV2009 since last week. Not once LV 8.6.1 Meanwhile, I started and I had no problems with my code so far. I also copied the contents of some new VI VI and saved again (maybe the VI has been altered due to the accident), but this did not help at all. I also rebooted the PC, but no, LV keeps crashing. Other code still works, but associated XML VI tend and especially the recursive programmed crash of XML VI. Would it maybe the VI Server? Come to think of it: to program a VI of recursively, you must do a recursive callback by the VI server. Maybe the error lies?

    suggestions, ideas, whatever it is: welcome!

    Thank you!

    Last night I solved the problem and indeed the other topic you mentioned is correct. It's actually a premature closure of the DOM reference that triggered the LV crashing. Very hard to debug because I use it in a recursive algorithm, but I managed to locate the error.

    LV reinstalled, but it kept if crush on so I was sure that it is thanks to my coding :-)

    I have to remember myself from time to time that all errors are human...

    Glad to see I'm not the only one dealing with these problems so thanks again Ajmal!

  • Saving to and read the XML code

    Hi, I wanted to just record in XML data and display it in the list. That's what I tried:

    #include "applicationui.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::data;
    
    ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
            QObject(app)
    {
    
        QVariantMap firstEmployee, secondEmployee;
    
        firstEmployee["firstName"] = QVariant("Mike");
        firstEmployee["lastName"] = QVariant("Chepesky");
        firstEmployee["number"] = QVariant("51649875");
        secondEmployee["firstName"] = QVariant("Westlee");
        secondEmployee["lastName"] = QVariant("Barichak");
        secondEmployee["number"] = QVariant("63257801");
    
        QVariantList myEmployeeList = QVariantList() << QVariant(firstEmployee)
                                   << QVariant(secondEmployee)
    
        QVariantMap topLevelEmployeeMap;
        topLevelEmployeeMap[".root"] = QVariant("employees");
        topLevelEmployeeMap["employee"] = QVariant(myEmployeeList);
        QVariant myData = QVariant(topLevelEmployeeMap);
    
        QTemporaryFile file("myXMLFile.xml");
    
        if (file.open()) {
    
            XmlDataAccess xda;
            xda.save(myData, &file);
        }    Page *root = new Page;
        ListView *listView = new ListView;
    
        GroupDataModel *model = new GroupDataModel(QStringList() << "firstName"
                                                   << "lastName");
    
        XmlDataAccess xda;
        QDir temp = QDir::tempPath();
        QVariant list = xda.load(temp.absoluteFilePath("myXMLFile.xml"),
                                 "/employees/employee");
    
        model->insertList(list.value());
    
        listView->setDataModel(model);
    
        root->setContent(listView);
        app->setScene(root);
    }
    

    Reference: https://developer.blackberry.com/native/documentation/cascades/device_platform/data_access/working_w...

    But this does not seem to display the items in the XML file. any thoughts?

    QFile use instead of QTemporaryFile, that the file could be deleted after the close() call:

        QVariantMap firstEmployee, secondEmployee;
    
        firstEmployee["firstName"] = QVariant("Mike");
        firstEmployee["lastName"] = QVariant("Chepesky");
        firstEmployee["number"] = QVariant("51649875");
        secondEmployee["firstName"] = QVariant("Westlee");
        secondEmployee["lastName"] = QVariant("Barichak");
        secondEmployee["number"] = QVariant("63257801");
    
        QVariantList myEmployeeList = QVariantList() << QVariant(firstEmployee)
                                   << QVariant(secondEmployee);
    
        QVariantMap topLevelEmployeeMap;
        topLevelEmployeeMap[".root"] = QVariant("employees");
        topLevelEmployeeMap["employee"] = QVariant(myEmployeeList);
        QVariant myData = QVariant(topLevelEmployeeMap);
    
        QFile file(QDir::temp().absoluteFilePath("myXMLFile.xml"));
    
        if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
    
            XmlDataAccess xda;
            xda.save(myData, &file);
        }
        file.close();
        Page *root = new Page;
        ListView *listView = new ListView;
    
        GroupDataModel *model = new GroupDataModel(QStringList() << "firstName"
                                                   << "lastName");
    
        XmlDataAccess xda;
        QDir temp = QDir::temp();
        QVariant list = xda.load(temp.absoluteFilePath("myXMLFile.xml"),
                                 "/employees/employee");
        model->insertList(list.value());
    
        listView->setDataModel(model);
    
        root->setContent(listView);
    
  • How to make httpconnection and get the xml response using httpconnection in post method.

    Hello

    I am new to the blackberry web work,

    I want to make httpconnection using the post method and also pass a parameter related to my url.

    This function returns xml data.

    How can I perform this task.

    Please help me if anyone has a solution...

    I have soved that problem myself.

  • Oracle Fusion Middleware 12 c WebLogic Server and coherence (12.1.2.0.0) only installs and launches javax.xml.bind.JAXBException: provider com.sun.xml.bind.v2.ContextFactory not found exception

    I am installing Oracle Fusion Middleware 12 c WebLogic Server and coherence (12.1.2.0.0) (V38518 - 01\wls_121200.jar), but I get the following error:

    javax.xml.bind.JAXBException: provider com.sun.xml.bind.v2.ContextFactory not found

    Please note that I also get the same error when I try to install Oracle Fusion Middleware 12 c (12.1.3.0.0) WebLogic Server and coherence (V44413-01\fmw_12.1.3.0.0_wls.jar).

    Here are the steps:

    1. excerpt from the wls_121200.jar to D:\Temp

    2. run D:\Java\jdk1.7.0_67\bin\java-jar wls_121200.jar

    3. following error is reported and the process terminates:

    javax.xml.bind.JAXBException: provider com.sun.xml.bind.v2.ContextFactory not fo

    und

    -with the exception related:

    [java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]

    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:151)

    at javax.xml.bind.ContextFinder.find(ContextFinder.java:298)

    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)

    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)

    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)

    at oracle.as.install.engine.config.xml.EngineConfigParser.getEngineConfi

    g(EngineConfigParser.Java:65)

    at oracle.as.install.engine.InstallEngine.startOperation (InstallEngine.j

    AVA: 425)

    at oracle.sysman.oio.oioc.OiocOneClickInstaller.main (OiocOneClickInstall

    St. Java:690)

    Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory

    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:366)

    in java.net.URLClassLoader$ 1.run(URLClassLoader.java:355)

    at java.security.AccessController.doPrivileged (Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

    to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:308)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:116)

    ... 7 more

    java.lang.NullPointerException

    at oracle.as.install.engine.InstallEngine.startOperation (InstallEngine.j

    AVA: 476)

    java.lang.NullPointerException at oracle.as.install.engine.InstallEngine.startOperation(InstallEngine.java:476)

    javax.xml.bind.JAXBException: provider com.sun.xml.bind.v2.ContextFactory not found

    Has anyone seen this error, or did someone knows how to solve this problem?

    I had several java installed on my computer so I thought this might be causing the problem. I went ahead uninstalled all the software just installed and java Oracle JDK 7 55 of update for Microsoft Windows x 64, set the path to be able to run java and ran "java-jar fmw_12.1.3.0.0_wls.jar". Installer is coming now.

  • Storage and retrieval of XML messages

    Hi all

    I have a table with a column VARCHAR2 (4000) that contains the XML messages as below.  I read these messages using the sub query and then insertion into different tables.  For the 2nd XML message, the select query becomes really big.  I'm more worried about XML messages where I have to type all these path and namespaces etc.  Is there an effective way to store these and then extract them with correct data types?  I might have a chance to change the way these XML messages are generated and then stored in the table.  So I am not limited to the below XML messages.  I use Oracle database 11 g 2 (11.2.0.3).

    #1 XML message

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
        <m:validate xmlns:m="http://abcllc.com">
          <m:Company>01</m:Company>
          <m:PurchaseOrder>673</m:PurchaseOrder>
          <m:POAmount>115875</m:POAmount>
        </m:validate>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

    #2 XML message

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
        <m:insert xmlns:m="http://abcllc.com">
          <m:JournalEntry>
            <m:Status>ACTIVE</m:Status>
            <m:AccountingDate>2009-08-20</m:AccountingDate>
            <m:CurrencyCode>USD</m:CurrencyCode>
            <m:CreatedDate>2009-08-21</m:CreatedDate>
            <m:CreatedBy>JDOE</m:CreatedBy>
            <m:ActualFlag>A</m:ActualFlag>
            <m:JournalType>AP</m:JournalType>
            <m:Company>01</m:Company>
            <m:ProjNbr>064522</m:ProjNbr>
            <m:Task>0061</m:Task>
            <m:CostCenter>6361</m:CostCenter>
            <m:EnteredDR>125.95</m:EnteredDR>
            <m:EnteredCR>0</m:EnteredCR>
            <m:AccountedDR>125.95</m:AccountedDR>
            <m:AccountedCR>0</m:AccountedCR>
            <m:BatchNumber></m:BatchNumber>
            <m:ID>05031</m:ID>
            <m:TransDescription>BOLDT COMPANY</m:TransDescription>
            <m:FiscalYear></m:FiscalYear>
            <m:PeriodEntered>200908</m:PeriodEntered>
            <m:PeriodPosted>200908</m:PeriodPosted>
            <m:Quantity>0</m:Quantity>
            <m:RefNumber></m:RefNumber>
            <m:ExtRefNumber>39000-J68</m:ExtRefNumber>
            <m:POExtPrice>0</m:POExtPrice>
            <m:POLineRef></m:POLineRef>
            <m:PONumber>11158</m:PONumber>
            <m:POQuantity>0</m:POQuantity>
            <m:POUnitPrice>0</m:POUnitPrice>
          </m:JournalEntry>
        </m:insert>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    

    Look for the message XML #1

    WITH t AS (
      SELECT xmltype('
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <SOAP-ENV:Body>
        <m:validate xmlns:m="http://abcllc.com">
          <m:Company>01</m:Company>
          <m:PurchaseOrder>673</m:PurchaseOrder>
          <m:POAmount>115875</m:POAmount>
        </m:validate>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    ') xcol
      FROM dual
    )
    SELECT extractValue(
             xcol
           , '/SOAP-ENV:Envelope/SOAP-ENV:Body/m:validate/m:Company'
           , 'xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
              xmlns:m="http://abcllc.com"'
           ) company,
    
    
           extractValue(
             xcol
           , '/SOAP-ENV:Envelope/SOAP-ENV:Body/m:validate/m:PurchaseOrder'
           , 'xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
              xmlns:m="http://abcllc.com"'
           ) PO,
    
    
           extractValue(
             xcol
           , '/SOAP-ENV:Envelope/SOAP-ENV:Body/m:validate/m:POAmount'
           , 'xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
              xmlns:m="http://abcllc.com"'
           ) POAmt
    FROM t;
    

    Thanks in advance.

    Hello

    Two things:

    (1) do not store the XML in VARCHAR2 or CLOB. Use XMLType, you will benefit from the analysis and storage of optimizations.

    (2) EXTRACTVALUE is obsolete and in any case not be appropriate for this requirement. XMLTable can analyze the document in columns and relational rows.

    e. g.

    SQL > create table tmp_xml of xmltype.

    Table created

    SQL >

    SQL > insert into tmp_xml values)

    2 xmltype ("http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP - ENC = "http://schemas.xmlsoap.org/soap/encoding/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container = "http://www.w3.org/2001/XMLSchema" >)

    3

    ' 4 http://abcllc.com ">

    5

    6 ASSETS

    7 2009-08-20

    8              USD

    9 2009-08-21

    10              JDOE

    11              A

    12              AP

    13              01

    14 064522

    15              0061

    16              6361

    17 125.95

    18              0

    19 125.95

    20              0

    21

    22 05031

    23 BOLDT COMPANY

    24

    25 200908

    26 200908

    27              0

    28

    29 39000-J68

    30              0

    31

    32 11158

    33              0

    34              0

    35

    36

    37

    38      ')

    (39);

    1 row inserted

    SQL >

    SQL > select x.*

    tmp_xml 2 t

    3, xmltable)

    4 xmlnamespaces)

    5 by default 'http://abcllc.com'.

    6, 'http://schemas.xmlsoap.org/soap/envelope/' like 'SOAP '.

    7         )

    8, ' /: envelope soap / soap: Body/insert/JournalEntry '

    9 t.object_value passage

    path of varchar2 (10) 10 columns Status "Status.

    11, path AccountingDate date "AccountingDate".

    12, path of VARCHAR2 (3) CurrencyCode "CurrencyCode.

    13, path CreatedDate date 'CreatedDate '.

    14, CreatedBy varchar2 (30) path "CreatedBy".

    (15) x

    16;

    STATUTE CURRENCYCODE CREATEDDATE CREATEDBY ACCOUNTINGDATE

    ---------- -------------- ------------ ----------- ------------------------------

    ACTIVE 20/08/2009 USD 21/08/2009 JDOE

  • About inclusion and generation of xml

    Hello gurus,
    I'm not very familiar with xml, I try to insert xml data (generated from the specific columns in the SALE_MEMO table) to the xmltype datatype memo_info column into the table EMP
    but when I try I get the following error


    ORA-06550: line 5, column 14:
    PL/SQL: ORA-00932: inconsistent data types: expected NUMBER obtained CLOB
    ORA-06550: line 5, column 7:
    PL/SQL: SQL statement ignored

    That's what I tried
    DECLARE
       lv_v_memo_info   XMLTYPE;
    BEGIN
       BEGIN
          SELECT REPLACE
                    (REPLACE
                        (REPLACE
                            (REPLACE
                                (REPLACE
                                    (SYS.DBMS_XMLGEN.getxml
                                        ('SELECT *
                                                   FROM (SELECT memo_type, total_due, total_rcvd
                                                           FROM sale_memo c
                                                          WHERE ROWNUM < 2)'
                                        ),
                                     '<ROW>',
                                     '<MEMO>'
                                    ),
                                 '</ROW>',
                                 '</MEMO>'
                                ),
                             '<ROWSET>',
                             '<MEMOINFO>'
                            ),
                         '</ROWSET>',
                         '</MEMOINFO>'
                        ),
                     '<?xml version="1.0"?>',
                     ''
                    )
            INTO lv_v_memo_info
            FROM DUAL;
       END;
    
       BEGIN
          INSERT INTO emp
                      (emp_no, job, mgr, hiredate, sal, comm, deptno, memo_info)
             (SELECT 7477, 'CLERK', 7782, SYSDATE, 1500, 3, 10, lv_v_memo_info
                FROM DUAL);
                
       END;
    END;
    If I change the type of local variable data data type of memo and clob column as clob I can insert it, but I want to insert my data on the change in the type of data that is as XMLTYPE.

    English please me,.

    Kind regards
    friend

    Edited by: most wanted! on April 7, 2013 23:55

    Try this out

    declare
      lCtx dbms_xmlgen.ctxhandle;
      lXml XMLType;
    begin
      lCtx := dbms_xmlgen.newcontext('select memo_type, total_due, total_rcvd from sale_memo where rownum < 2');
    
      dbms_xmlgen.setrowsettag(lCtx, 'MEMOINFO');
      dbms_xmlgen.setrowtag   (lCtx, 'MEMO');
    
      lXml := dbms_xmlgen.getxmltype(lCtx);
    
      dbms_xmlgen.closecontext(lCtx);
    
      insert into emp(emp_no, job, mgr, hiredate, sal, comm, deptno, memo_info) values (7477, 'CLERK', 7782, SYSDATE, 1500, 3, 10, lXml);
    end;
    /
    
  • How to add the version and encoding in XML format

    Hello

    I generate an XML using code such as
    SELECT  XMLELEMENT(
                 "Document"
                ,XMLAttributes(
                     'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99' AS "xmlns"
                    ,'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
                    ,'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd' AS "xsi:schemaLocation"
                    )
            )
    FROM    dual;
    The result ist
    <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd">
    </Document>
    But I need
    <?xml version="1.0" encoding="UTF-8"?>
    <Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd">
    </Document>
    I can add the header in my selection?

    The XMLTYPE is inserted in a table and from there transferred via webutil to location of the customer.
    I have found that I can convert the XMLTYPE in a DOM document, and then use dbms_XMLDom.setCharset, but how do I convert to an XMLTYPE. The only way I've found is to convert it to a CLOB, then in an XMLTYPE.

    Concerning
    Marcus

    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    >
    I was going to suggest XMLRoot but he does not understand the encoding
    >
    Why? :)

    SELECT XMLROOT(
           XMLELEMENT(
                 "Document"
                ,XMLAttributes(
                     'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99' AS "xmlns"
                    ,'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
                    ,'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd' AS "xsi:schemaLocation"
                    )
            )
            , version '1.0" encoding="UTF-8'
           )
    FROM    dual;
    

    Another way

    SELECT XMLTYPE
               (
                  '' ||
                  xmlElement("Foo",'Fii').getClobVal()
               )
    FROM DUAL
    

Maybe you are looking for

  • Photosmart C4280 - cannot get new cartridges!

    Hi all.  As title, I try to put new cartridges, which I've often done it before without any problem, but they're going to step in.  Also tried to put the old ones back in but they will not go into the two.  I wonder if there is something that could h

  • Satellite Pro 6100 does not recognize the single battery external power

    Whenever I have start Satellite Pro 6100 Win XP Pro with standard battery mounted and connected to the power supply computer laptop does not recognize the ext battery supply single supply and during 'start-up' goes into hibernation. By pressing the p

  • Skype Manager Login Trouble because of SIP

    Hello We strive to connect to our existing Skype Manager account, we know that our account name and changed the password, but when I try to connect I get this message: -. This Skype account is currently attached to a SIP profile... And I have to cont

  • AppleTV and purchased TV shows

    I have an AppleTV 4th gen has recently discontinued showing all the tv shows that I have purchased through iTunes.  The strange thing is that all my purchased movies and music appear.  So far, I have tried the following troubleshooting steps: 1 reboo

  • Reader SuperDrive does not burn after upgrade of el capitan

    Almost immediately after upgrading a mac mini end of 2014 to el capitan (10.11.2), the superdrive has lost his ability to write DVD. It is recognized by the system and can read DVDs fine, but any attempt to burn files or an ISO image on a disc breaks