Home » SQL & PL/SQL » SQL & PL/SQL » How to do insert an xml with a XML reserved character
How to do insert an xml with a XML reserved character [message #292739] Wed, 09 January 2008 15:12 Go to next message
jonathan184
Messages: 21
Registered: November 2006
Junior Member

How to do insert an xml with a XML reserved character

Basically ig ot an insert statement, where i am trying to insert a xml in CLOB field but in the xml it contains XML reserved character which is the & I tried replacing it with & but the insert statement stilld does not work. How would i do this?
here is what i have, How could i put this in a oracle statement.
I tried replacing the & with & but got the same issue not accepting the amber sign
<Condition>
      <Value>customer & me</Value>
    </Condition>
Re: How to do insert an xml with a XML reserved character [message #292740 is a reply to message #292739] Wed, 09 January 2008 15:21 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
My car does not work so I changed the oil but still does not work. How would i do this?

The problem statement leaves a lot to be desired; like usable facts.

So I am forced to guess at a solution.
SQL> SET DEFINE OFF

[Updated on: Wed, 09 January 2008 15:21] by Moderator

Report message to a moderator

Re: How to do insert an xml with a XML reserved character [message #292744 is a reply to message #292740] Wed, 09 January 2008 15:29 Go to previous messageGo to next message
jonathan184
Messages: 21
Registered: November 2006
Junior Member

well in this case i said there was no oil in the engine.

but here is the model and VIN number of the car

Insert into Routing_rule rr
values ('<Condition>
      <Value>customer & me</Value>
    </Condition>',
USER,
SYSDATE,
NULL,
NULL,
'N',
'SR',
'CUSTOMERID')

[Updated on: Wed, 09 January 2008 15:29]

Report message to a moderator

Re: How to do insert an xml with a XML reserved character [message #292745 is a reply to message #292739] Wed, 09 January 2008 15:31 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
here is what I know.
I see an insert statement.
I've heard there is a problem.

Here is what we don't know.
What OS name & version?
What Oracle DB version to 4 places?
What client s/w name & version?
What actual error message?
Re: How to do insert an xml with a XML reserved character [message #292746 is a reply to message #292739] Wed, 09 January 2008 15:32 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
set define off

Regards
Michel
Re: How to do insert an xml with a XML reserved character [message #292748 is a reply to message #292739] Wed, 09 January 2008 15:35 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
Quote:


set define off

Regards
Michel




I said that in my FIRST response
Re: How to do insert an xml with a XML reserved character [message #292751 is a reply to message #292739] Wed, 09 January 2008 15:39 Go to previous messageGo to next message
jonathan184
Messages: 21
Registered: November 2006
Junior Member

its not wokring for me set define off.

I am using plsql developer
not sql plus.

Do you know how to do it in this interpreter?
Re: How to do insert an xml with a XML reserved character [message #292752 is a reply to message #292739] Wed, 09 January 2008 15:41 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
do you know how to answer questions previously asked?

[Updated on: Wed, 09 January 2008 15:41] by Moderator

Report message to a moderator

Re: How to do insert an xml with a XML reserved character [message #292753 is a reply to message #292748] Wed, 09 January 2008 15:47 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
anacedent wrote on Wed, 09 January 2008 22:35

Quote:


set define off

Regards
Michel




I said that in my FIRST response

Sorry Ana I didn't read your answer.
I just read the question and I thought one more "set define off" it's only the third time this week. Mad

Regards
Michel

Re: How to do insert an xml with a XML reserved character [message #292755 is a reply to message #292739] Wed, 09 January 2008 15:50 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
Quote:


Sorry Ana I didn't read your answer.
I just read the question and I thought one more "set define off" it's only the third time this week.

Regards
Michel


No problem; & which is why I guessed SET DEFINE OFF too,
I had known the OP was NOT using SQL*Plus much of this exchange would not have been needed.

Since OP chooses to not answer my questions, I choose to not answer his.
Re: How to do insert an xml with a XML reserved character [message #292757 is a reply to message #292745] Wed, 09 January 2008 15:53 Go to previous messageGo to next message
jonathan184
Messages: 21
Registered: November 2006
Junior Member

Here is what we don't know.
What OS name & version? if you are talking about the client windows vista ultimate and db is on HP unix not sure of version
What Oracle DB version to 4 places? 9i thats all i know
What client s/w name & version?
Oracle9i
Client Release Notes
Release 2 (9.2.0.1.0) for Windows
client interpreter is PLSQL Developer 6.05.931
What actual error message?
ORA-31011:XML parsing failed
ORA-19202:Error occurred in XML processing
LPX-00242: Invalid use of ampersand(")character(use amp;)

So i replaced the & with &amp; then i tried amp;
and got this message
a popup window with a title variables two columns
name - amp value & then i got ok and cancel i clicked ok and the same error above came up.


Re: How to do insert an xml with a XML reserved character [message #292759 is a reply to message #292752] Wed, 09 January 2008 15:55 Go to previous message
jonathan184
Messages: 21
Registered: November 2006
Junior Member

dude i just sent it

[Updated on: Wed, 09 January 2008 15:57]

Report message to a moderator

Previous Topic: CASE STATEMENT help
Next Topic: Bulk collect
Goto Forum:
  


Current Time: Sun Dec 04 04:33:05 CST 2016

Total time taken to generate the page: 0.04261 seconds