Current Position:Home > How to insert single colon xml text in the xml table

How to insert single colon xml text in the xml table

Update:10-11Source: network consolidation
Advertisement
Dear Sir,
how to insert special characters like single colon text example (don't) xml text in to the xml table
please see the following example its giving me error quoted string is not ended properly
SQL> insert into ftr_ctl values (1,
2 xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://www.oracle.com/FC.xsd
5 http://www.oracle.com/FC.xsd">
6 <row>
7 <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
8 <AlphaCode>ZB032</AlphaCode>
9 <Name>Baseline Point</Name>
10 <Status>Submitted</Status>
11 <Definition>A location that serves as a point on, and which partially defines a segment
of, a national boundary baseline.</Definition>
12 <Description>May be monumented or unmonumented. A national boundary baseline is used fo
r defining the landward edge or margin of a nation's various contiguous zones such as the 3 and 12 n
autical mile limits and the Exclusive Economic Zone (EEZ).</Description>
13 </row>
14 </po:root>'));
ERROR:
ORA-01756: quoted string not properly terminated
how to solve single quotation like (nation's) in xml data insertion
please give me reply as soon as possible
Thanks
Kabeer

The Best Answer

Advertisement
Hi,
Use &#x7B;code} tags to post formatted code on the forum.
That way, your code will be more readable for everyone, and more importantly here, everyone will be able to clearly see what's bothering you :
&apos;sThe single quote was encoded with the character entity reference "&amp;apos;".
The conversion is not mandatory but it happens Oracle is doing it in this case.
It shouldn't be a problem though.
If you want to extract the value afterwards, it'll come as expected :
SQL> create table ftr_ctl (id number, doc xmltype);
Table created
SQL> insert into ftr_ctl values (1,
  2  xmltype('<po:root xmlns:po="http://www.oracle.com/FC.xsd"
  3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4  xsi:schemaLocation="http://www.oracle.com/FC.xsd
  5  http://www.oracle.com/FC.xsd">
  6  <row>
  7  <UniqueIdentifier>urn:x-gcs:def:featureType:GFDD::FT_DFDD_100565</UniqueIdentifier>
  8  <AlphaCode>ZB032</AlphaCode>
  9  <Name>Baseline Point</Name>
10  <Status>Submitted</Status>
11  <Definition>A location that serves as a point on, and which partially defines a segment of, a national boundary baseline.</Definition>
12  <Description>May be monumented or unmonumented. A national boundary baseline is used for defining the landward edge or margin of a nation''s various contiguous zones such as the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).</Description>
13  <Alias xsi:nil="true"></Alias>
14  <SourceItemIdentifier>100565</SourceItemIdentifier>
15  <SourceReference>DGIWG DFDD BL 2011-1.00</SourceReference>
16  <SourceURL>https://www.dgiwg.org/FAD/fdd/view?i=100565</SourceURL>
17  </row>
18  </po:root>'));
1 row inserted
SQL> select extractvalue(doc, '/po:root/row/Description','xmlns:po="http://www.oracle.com/FC.xsd"')
  2  from ftr_ctl
  3  where id = 1
  4  ;
EXTRACTVALUE(DOC,'/PO:ROOT/ROW/DESCRIPTION','XMLNS:PO="HTTP://WWW.ORACLE.COM/FC.
May be monumented or unmonumented. A national boundary baseline is used for defi
ning the landward edge or margin of a nation's various contiguous zones such as
the 3 and 12 nautical mile limits and the Exclusive Economic Zone (EEZ).
{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
  • How to insert single colon xml text in the xml table Update:10-11

    Dear Sir, how to insert special characters like single colon text example (don't) xml text in to the xml table please see the following example its giving me error quoted string is not ended properly SQL> insert into ftr_ctl values (1, 2 xmltype('<p

  • Insert single column Update:11-30

    Hi all. What is the sql statement for insert a single column to  the table? Let say i gt a student table and a admino column. Thanku can never insert a single column. atleast u should insert blanks to the other fields. inserting a row is possible , i

  • How to insert text data into temp tables.... Update:11-30

    Dear All, I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list.... and there is no delimiter and exact spaces..(i.e, zizak fomat) Ex:- xx yy 00009999 kk mmmm 00009333 Data is availabl

  • XML Table Update:11-30

    Hi Friends, This is XML Table: CREATE TABLE personal_data ( person_id NUMBER(13), person_data XMLTYPE); Insert Data into XML Table: insert into personal_data (person_id,person_data) values (1017,XMLTYPE(' <start>                <name>Sankarana

  • Inserting line in a Text file using java Update:10-11

    Hi, I am working on a project in which the some data is required to be stored in a text file. I have lines of data in the file and I read 1 line at a time. So now I need to insert some lines of text in between. How to do this ?? Now i'm using a tempo

  • Problem inserting and querying XML data with a recursive XML schema Update:10-11

    Hello, I'm facing a problem with querying XML data that is valid against a recursive XML Schema. I have got a table category that stores data as binary XML using Oracle 11g Rel 2 on Windows XP. The XML Schema is the following: <?xml version="1.0&q

  • HT4623 updated "successfully" to iOS7 on my 4S but now it takes FOREVER to recognize each keystroke - even to type in passcode.  also takes forever to type a single key in text.  HELP. Update:10-11

    updated "successfully" to iOS7 on my 4S but now it takes FOREVER to recognize each keystroke - even to type in passcode.  also takes forever to type a single key in text.  HELP.Adjusting the date or time didn't do anything for me either. I'm gue

  • Multiple PUs in a single persistence.xml Update:10-11

    Hi, I'm trying to define two different PUs for a standalone and Java EE environments, so a single persistence.xml could be used. Here goes the persistence.xml file: <?xml version="1.0" encoding="UTF-8"?> <persistence version=&

  • Column Validation on Single Line of Text Update:10-11

    I have a sharepoint input form in SP2013, which contains text field with below properties 1. Type: Single line of Text 2. Under Column validation  =AND(ISNUMBER([Column name]+0),ISERROR(FIND(".",[Column name],1))) On form submit, the above condi

  • Sharepoint 2013, Document Library: Sharepoint is changing data in a single line of text column to ISO8601 after modifying other columns Update:10-11

    Hello there, basically, as the title says: We have a Document Library on a Sharepoint 2013. Attached to every document are multiple columns, the type for every column is 'Single line of text'. One column is called 'billing date' and has suitable data