XML insert problem

Hi,
I am trying to insert an xml ducument into table.
But because of quotation i the file is not getting inserted.
here is the Insert statement
INSERT INTO MYTABLE3
VALUES(' <catalog>
     <book >
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>'
The following line causing the error
<title>XML Developer's Guide</title>
can anybody tell me how to solve this problem.
cheers
RRK

Simply escape it with another single-quote inside the main content.
For example, try
     SELECT 'New Year''s Day' FROM dual;
Hope this helps
Gajanan

Similar Messages

  • XML Insertion - Windows To Linux

    I have a JScript executable that parses an input file containing data in PVL format and uses the DOM to create an XML record, which the script then writes to an output file. The script, input and output files all reside on a local Windows XP machine with Internet Explorer 6.0.
    I need the script to insert the output file into a table that is defined against an XML schema. However, the 10.2 database resides on a Linux x86 box (OS is Red Hat Enterprise Linux Advanced Server), not the Windows client.
    The script can successfully connect to the database (thanks to ODBC) and it is successfully inserting non-XML data into other tables. However, for the XML file, I'm trying to use the following insert statement (the db table's name is AIP_XMLTYPE and the XML output file is type1_aip.xml):
    INSERT INTO AIP_XMLTYPE VALUES (XMLTYPE
    (BFILENAME('LOCAL_XMLDIR','type1_aip.xml'),
    nls_charset_id('AL32UTFS')));
    LOCAL_XMLDIR is a directory defined in the database for the local C drive where the XML file resides. (I suspect this is the problem. Does a defined directory have to be on the database server?) The error the script returns is
    [Oracle][ODBC][Ora]ORA-22288: file or LOB operation FILEOPEN failed. No such file or directory.
    When I manually upload the XML file onto the Linux server and execute the insert statement in SQL*Plus (using a defined directory on the server, of course, instead of LOCAL_XMLDIR), it is successful, so I don't believe there is an issue with how the XML schema is defined nor with the format of what's in the XML file.
    Is there another way I could insert the XML record? Is there another way to get the database to recognize the local directory? Could I have the script upload the XML file to the db server and then do the insertion?
    Any suggestion is appreciated.

    Hi,
    You may can get some ideas from the case posted at http://www.oraclepoint.com/topic.php?filename=98&extra=page%3D1
    Please register and then log in to get the case doc because it's only available for members.
    By the way, I don't think the cross-platform issue will impact the implemtment of XML loading to database. I do hope the case study above helps.

  • WIJ 20002 xml Parser Problem - Rich Client

    Hi,
    I have a problem with the rich client on a new installation:
    Business Objects Enterprise XI 3.1 SP3 on Windows 2008 Standard.
    If I connect with the rich client "import document"is disabled.
    if I try to create a new document from the rich client it returns the error below (I used the rich client on two workstations):
    WIJ 20002
    Version: null
    Analisi dello stack:
    java.lang.RuntimeException: java.lang.RuntimeException: XML parser problem:
    XMLJaxpParser.parse(): Element type "ABOUT_Patentnumbers" must be followed by either attribute specification, ">" or "/>".
    at com.businessobjects.wp.xml.jaxp.XMLJaxpParser.parse (Unknown Source)
    at.com.businessobjects.webi.richclient.XMLviaOccaRC.getServerConfiguration (Unknown Source)
    Have you any solution?

    The fixpack 3.5 client resolves the problem.

  • XML - ExportDocument problem

    I'm exporting a xml document that I'm creating dynamically in my application.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have to write a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down (let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the root element
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>) so I
    cannot have the dtd information on the stream, and cannot enforce validation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something is wrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca

    I'm interested in DTDs. For example in the reported situation, why, if you
    know you've created a valid XML document would you want to give a DTD to
    someone at the other end? If someone has a DTD at the other end and want to
    use it to validate your XML then fine but if you create the XML and are
    controlling the format then wouldn't they just assume the XML correct if the
    DTD wasn't being controlled by a 3rd party or themselves?
    DTDs don't help you create a document but just validate it, I'd thought. If
    there is more to DTDs I'd appreciate if someone felt like ellaborating.
    Thanks.
    Matthew Middleton
    OrYx Software Consultant
    Lawpoint Pty. Limited
    A Solution 6 Company
    Ph: +61 2 9239 4972
    Fax: +61 2 9239 4900
    E-mail matthewmwriteme.com
    ----- Original Message -----
    From: Luca Gioppo <Luca.GioppoCSI.IT>
    To: <forte-userslists.xpedior.com>
    Sent: Tuesday, August 08, 2000 8:24 PM
    Subject: (forte-users) XML - ExportDocument problem
    >
    >
    I'm exporting a xml document that I'm creating dynamically in myapplication.
    I'm having the following problems (working with 30M.2).
    1)
    It's not possible to edit a DTD (or creating one run time) so I have towrite a
    template doc XML to have it.
    I'm afraid that this is a costraint on the DOM1 so ...
    2)
    Once I complete the construction of the doc, I need to write it down(let's say
    on a file, but could be also in memory to send it on http).
    When I write it (using exportdocument function) I just find the rootelement
    with all it's children, no haeder (<?xml version="1.0" ?><!DOCUMENT ...>)so I
    cannot have the dtd information on the stream, and cannot enforcevalidation of
    the doc when someone read it afterwards.
    I admit I'm new of the subject, but or I miss something or something iswrong:
    having trouble to get a dtd and not being able to code it's information.
    Anyone has some ideas?
    TIA
    Luca
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Update/Insert Problem with Oracle Warehouse Builder

    Hello,
    i have update/insert problem with owb.
    Situation: I have a source-table called s_account and a target table called w_account_d. In the target table are already data which was filled trough the source table inserts. Now anyone make changes on data on the target table. This changes should now give further on the source table with an update operation. But exactly here is the problem i can´t map back the data to source because that will create a loop.
    My idea was to set a trigger but i can´t find this component in owb or is anywhere hidden?
    Also i have already seen properties as CDC or conditonal loading in the property inspector of the table, but i have no idea how it works.
    Give it other possibilities to modeling this case? or can anyone me explain how i can implement this eventually with CDC?
    I look forward for your replies :)

    Hi
    thanks for your answer. I follow your suggestion and have set the constraints of both tables into the database directly.Nevertheless it doesn´t work to begin. In the next step i found by right click on a table the listpoint "configure" - I goes to "unique key" --> creation method and set here follow options: Constraint State = ENABLE, Constraint Validation = Validate. That error message that appears before by the deployment disappears yet. Now i start the job to test if the insert/update process works right. Finally it seems to work - but not really.
    My Testscenario
    1. Load the data from source table about the staging area to data warehouse table: Check - it works!
    2. Change one data record in source table
    3. Load the source table with changed data record once again to staging area: Check - it works!
    4. Load new staging area table with the changed data record to data warehouse table: Check it works! BUT, BUT i can not recognize if it is insert or update operation, then under the design window by jobs execution windows is reported "rows selected 98", Rows inserted" is empty and "rows updated" is empty. So i think works not correct, then my opinion if it works correct it should show be "rows updated" 1.
    What can yet now still be wrong or forgotten? Any ideas?
    *By the way think not 98 rows there is not important if you make an update or insert which performance. It is an example table the right tables have million of records.*
    I look forward for your answers :)

  • Txt to xml. Problems with characters(&, , ',...)

    I want to generate a xml file with text from a txt file but i have problems with special characters such as &, <... I'd like to know if there�s any class or library to filter the text in order to generate my xml without problems.
    Thank you.

    Use JDOM to generate your XML. It will worry about escaping issues for you.
    Here's a (probably rather inelegant) example for you to play around with:
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.*;
    public class DateBoom {
         public static void main(String[] args)
              throws Exception
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder = factory.newDocumentBuilder();
              String dodgyText = "< & '";
              Document document = builder.newDocument();
              Element root = document.createElement("root");
              root.setAttribute("dodgy",dodgyText);
              document.appendChild(root);
              Element child = document.createElement("child");
              root.appendChild(child);
              child.appendChild(document.createTextNode(dodgyText));
              Transformer transform = TransformerFactory.newInstance().newTransformer();          
              Source source = new DOMSource(document);
              Result result = new StreamResult(System.out);
              transform.transform(source,result);
    }Your alternative is to use something like String regular expressions (regex) to do this manually, but the XML oriented libraries will catch more corner cases than you're likely to anticipate, making them more reliable.

  • CRUD insert problems.

    Hello all,
    I was wondering about DB operations in JSF pages, so I took a look over the Single Page CRUD example. What hitted me was there is a need for a two step insertion, first by issuing a select in search for the biggest ID of the primary key, and after that the insertion of the element with that obtained biggest ID + 1. I see at least 2 problems with this approach:
    1. Concurrency issues.What happends if 2 users are issuing at the same time an insert operation over the same table? There is the possiblity of getting the same ID to insert, and the first one could insert, but the second one would fail even if it's request is logically corect (validated & converted). I see three solutions over the insert problem:
    a. lock on the database (if it's possible).
    b. using a synchronized block in the application bean to get the ID and insert.
    c. using DB specific constructs (e.g. MySQL's AUTO_INCREMENT)
    2. Overhead issues. Why doing in two steps an operation that should be just an insert? Previous a. an b. approaches do not solve our overhead problem, because we still have two steps in insertion; we only synchronize them.
    I was wondering which is the best practice for production quality web applications. Personally because I've picked MySQL as DB I've used AUTO_INCREMENT, but the immediate huge and obvious drawback is dumping DataProvider's capability of changing the storage medium at a glance.

    I'm not sure if I entirely understood your questions here.
    - Concurrency problem.
    database bound Data provider underneath uses CachedRowset, which uses SyncProvider to take care of concurrency problem. If the default RIOptimisticProvider is not enough, it possible to register other more sophisticated SyncProvider.
    You can read about it here.
    http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html
    - Overhead issue
    I believe, it is possible to let the DB auto increment the primary key field, and left it out in the insertion from data provider.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • How do I convert an XML insert into ordinary text?

    I have a fm9 file, about half of it is in elements that can be directly edited through the structured view, but the other half seems to be ax xml insert which is awkward to edit. Is there any way to import this xml insert into the document so it consists of  'ordinary' elements alongside the elements already in there, and is also manageable in the same way as the elements already in the structured view. Thanks.

    A little background....
    If you have a structured fm file, you can insert by reference (a text inset) another file that contains structure. I am assuming that the inserted file uses the same set of elements (same element catalog) as the containing file, or the result would not be valid. Now click on the text inset to select it, and select Edit > Text Inset Properties. In the dialog, click Convert. This converts the text inset into editable ELEMENTS, not text; it is the same as if you had imported the inserted file by copy. You can now edit those inserted elements as part of the containing file; in fact, they ARE part of the file, no longer connected to the original inserted file.
    I have never used text inset XML. But I am guessing that the elements in the XML file are compatible (i.e., the same set) with the elements in the containing file; otherwise, the resulting file would not be valid. So, I am guessing that all you need to do is the same as with a standard structured text inset, that is, follow the same instructions as above.
    If this is not what you are trying to do, please clarify.
    Van

  • How to change date format for xml insert to a view

    We want to accept more than one data format in an XML insert using DBMS_XMLSave.insertXML(insCtx,xmlDoc);
    The two formats are
    6/7/2004 10:47:21 - This is working
    2004-06-08-04:00 - This gives the error
    java.text.ParseException: Unparseable date: "2004-06-08-04:00"'

    Make the column datatype VARCHAR2

  • !DOCTYPE !ENTITY war file xml splitting problem

    Hi,
    I am trying to split a file - struts-config.xml - which eventually gets
    located into my war file.
    Here is the xml file.
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
    Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"
    <!ENTITY struts_FormBeans SYSTEM "./struts_FormBeans.xml">
    <!ENTITY struts_GlobalForwards SYSTEM
    "./struts_GlobalForwards.xml">
    <!ENTITY struts_ActionMappings SYSTEM
    "./struts_ActionMappings.xml">
    >
    The problem that I run into is that the xml parser at deploy time cannot
    locate the struts_FormBeans.xml file which is located in the same place as
    the struts-config.xml file.
    Does anyone know a way to tell it to look in the war file?
    or Does anyone know a better place to post a question like this?
    Thanks in advance!!

    The problem that I run into is that the xml parser at deploy time cannot
    locate the struts_FormBeans.xml file which is located in the same place as
    the struts-config.xml file.Uh-uh. Ran into this also.
    Does anyone know a way to tell it to look in the war file?Not me, but I wish I could.
    or Does anyone know a better place to post a question like this?This seems more like a Struts issue to me. Look here:
    http://marc.theaimsgroup.com/?l=struts-user&m=100016330124990
    and follow the thread. Someone suggested a patch to the ActionServlet, I
    haven't tried it yet. It sounds good and will probably do what you want.
    --Renaud
    "IH" <[email protected]> wrote in message news:[email protected]..
    Hi,
    I am trying to split a file - struts-config.xml - which eventually gets
    located into my war file.
    Here is the xml file.
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
    Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"
    <!ENTITY struts_FormBeans SYSTEM "./struts_FormBeans.xml">
    <!ENTITY struts_GlobalForwards SYSTEM
    "./struts_GlobalForwards.xml">
    <!ENTITY struts_ActionMappings SYSTEM
    "./struts_ActionMappings.xml">
    >
    The problem that I run into is that the xml parser at deploy time cannot
    locate the struts_FormBeans.xml file which is located in the same place as
    the struts-config.xml file.
    Does anyone know a way to tell it to look in the war file?
    or Does anyone know a better place to post a question like this?
    Thanks in advance!!

  • Text insertion problem with 'Share' applications

    When I add photos to an email in iPhoto (9.3) using the templates and try to insert text, the "insert your message here" dialogue cannot be removed and my text sustituted.  Also the same situation in the book and card creation programs. This is just a recent development. Any ideas?   

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If it doesn't then you current library is the culprit.
    In that case  make a temporary, backup copy of your library if you don't already have one (Control-click on the library and select Duplicate from the contextual menu) and  apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    You might consider using Mail as your email client instead of iPhoto.  Mail has photo stationary similar to iPhoto's themes and is easier to add multiple addresses and provides a Sent copy.
    OT

  • Sliding Flash Interface - Using Links from an XML file Problem

    Hi All,
    Working on a new site for the company i've recently started
    working for... fairly new to flash but wanted to try this sliding
    interface for the graphic banner at the top of the page...
    have a look here at an early version of the site - sliding
    graphic interface at the top with coloured rollover buttons (a lot
    of work still to do! feel free to post constructive criticism)
    (am I allowed to post links??)
    here is the unfinished version with no links in the flash bit
    http://www.westfieldhealth.com/website/index.asp
    The Problem:
    I am pulling in a 'heading' 'text' and 'image' into the
    sliding graphic interface from the following xml file... (there are
    4 different xml files for 4 different slides)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <content>
    <dialogue>
    <heading>Interested in selling our health
    plans?</heading>
    <text>Click here to learn more...</text>
    <img>home_window/intSmall.jpg</img>
    </dialogue>
    </content>
    I want to add a link to the xml that would be specific to
    each instance of the window...
    eg
    <link>contact-us/index.asp</link>
    But my limited knowledge of flash means I have no idea how to
    pull the link through from the xml file to use in the flash...
    Perhaps I need link text to pull as well
    eg
    <link-text>click here to contact us</link-text>
    Here is the function that pulls in the img, heading and txt
    public function onComplete(event:Event):void {
    var loader:URLLoader = event.target as URLLoader;
    if (loader != null) {
    externalXML = new XML(loader.data);
    mover_mc.heading_txt.htmlText =
    externalXML.dialogue[0].heading;
    mover_mc.myText_txt.htmlText = externalXML.dialogue[0].text;
    var url:URLRequest = new
    URLRequest(externalXML.dialogue[0].img);
    myLoader.load(url);
    } else {
    trace("loader is not a URLLoader!");
    Can anyone help me on how to pull in the link from the xml
    and use it to navigate to a different page on the site
    Thanks very much
    Hans
    link to
    my unfinished flash file...

    What is the exact error you get (what db version also), could you post a simplified version of the SQL which fails also? I have splitter based maps that successfully read from file via the XMLType(bfilename....) style code and insert into multiple targets, I did this on 11g though.
    Cheers
    David

  • Xml extract problem

    I have a problem about sql to extract xml node,the sql followed:
    select a.disptx.extract('/Record/_20/text()').getStringVal() from swifti a where swidty = '6666666666666666666'
    and the clob is :
    <Record>
    <swrctm>2223</swrctm>
    <swintm>22:23:13</swintm>
    <swindt>20100826</swindt>
    <fmbank>ssssss</fmbank>
    <tobank>444444rrrrrrr</tobank>
    <fm>sdfds</fm>
    <to>wwwwwwwwww</to>
    <mgtype>103</mgtype>
    <swftid>dddddd</swftid>
    <sw108f>dddddd</sw108f>
    <swackf>0</swackf>
    <_20>fffffffffff</_20>
    </Record>
    that throw the exception:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: '/Record/_20/text()'
    ORA-06512: at "SYS.XMLTYPE", line 111
    31011. 00000 - "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    can help me?

    you need convert clob to xmltype
    select xmltype(a.disptx).extract('/Record/_20/text()').getStringVal() from swifti a
    create table test (x clob);
    Table created.
    insert into test values ('<Record>
    <swrctm>2223</swrctm>
    <swintm>22:23:13</swintm>
    <swindt>20100826</swindt>
    <fmbank>ssssss</fmbank>
    <tobank>444444rrrrrrr</tobank>
    <fm>sdfds</fm>
    <to>wwwwwwwwww</to>
    <mgtype>103</mgtype>
    <swftid>dddddd</swftid>
    <sw108f>dddddd</sw108f>
    <swackf>0</swackf>
    <_20>fffffffffff</_20>
    </Record>');
    commit;
    1 row created.
    Commit complete.
    SELECT xmltype(x).EXTRACT ('/Record/_20/text()').getstringval ()
      FROM test;
    XMLTYPE(X).EXTRACT('/RECORD/_20/TEXT()').GETSTRINGVAL()                        
    fffffffffff                                                                    
    1 row selected.http://docs.oracle.com/cd/B10500_01/appdev.920/a96620/xdb04cre.htm

  • Excel XML map problem with numbers.

    Hi Xcelsius gurus,
    Once again i need your help.
    I use Excel XML maps to get data into my embedded spreadsheet, my data are current year sales per month like below:
    115.450,36
    220.336,20
    189.222,56
    200.005,48
    just numbers.
    After inserting the xml data i am not able to use them. No chart, No list, No gause can present my data. Like there is no data.
    I realised that after mapping the XML, spreadsheet's cells showing an error, when i click on error icon there is an option to convert data to number, that fix the problem.
    What could i do to solve this issue? Is there any problem with my XML file?
    Pease help me with this one, i am confused.

    Hi:
       what is your xml file format?
       you can try some ordinary xml format instead, here is a example:
       <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book catalog="Programming">
    <title lang="en">C++ Programming Language</title>
    <author>Bjarne Stroustrup</author>
    <year>998</year>
    <price>198.0</price>
    </book>
    <book catalog="Networking">
    <title lang="en">TCP/IP Illustrated</title>
    <author>Richard Stevens</author>
    <year>1996</year>
    <price>156.0</price>
    </book>
    </bookstore>

  • Nested XML inserted as NULL in table

    I am inserting a nested XML document into two relational tables. I am using Chapter 12 of Steve Muench's book as a guide to build the two tables, the table and object types, the view and the trigger. The master table inserts fine. The row count on the detail table is correct with the PK from the master being inserted, but the values for all of the nested data in the detail table are NULL.
    This same exact thing happens when I use a nested table on the master table instead...nested values are NULL in that collection as well.
    I tried posting all of the code earlier, but the forum post puked. I can again if needed.
    I have seen a couple of old posts on this problem, with no answers...
    TIA,
    Dave

    Thanks for the reply.
    When I am using (Coulmn) == "" ? NULL(DT_WSTR,225) : Coulmn for making blank as null it is working fine.
    But it is making null as string, but I don't want to use null as string. As I am using Null in my stored procedure to load sub region data where "country is null".
    If I will use above expression of derived column it will make it as string which is not recommended in my case.
    Do you have any solution for it.

Maybe you are looking for