Re: XML Parsing: <line >, <character> illegal name character
- From: "Aaron Bertrand [SQL Server MVP]" <ten.xoc@xxxxxxxxxxxxxx>
- Date: Wed, 01 Jul 2009 14:18:52 -0400
You will need to post somewhere (since pasting code into the web-based
nonsense will clearly not work) the *ACTUAL* call you are making to SQL
Server. I am sorry but I am not able to debug your XSLT voodoo magic
through this mode.
On 7/1/09 1:42 PM, in article
E03CE4A8-1D40-4F6B-AA2B-FC0E4CD499FF@xxxxxxxxxxxxx, "Sandeep"
<Sandeep@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Sorry,This is the first time I am posting here. Please bear with me.
I can confirm that in incoming xml message, there is no space between & and
amp and ;.
I have also posted the xml message.
"Aaron Bertrand [SQL Server MVP]" wrote:
Sorry, but I don't think you are understanding. There should not be any
spaces between & and amp and ;. I think part of the problem is that you are
using the web interface and this is causing problems with how HTML-encoded
entities are being displayed. I'd suggest using a real newsreader instead
of the web-based garbage but I'm afraid the real newsreaders are being
forced out.
On 7/1/09 1:26 PM, in article
0686A2FD-374C-47EB-B2DF-E219CFE270AD@xxxxxxxxxxxxx, "Sandeep"
<Sandeep@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Incoming message has ( ' & amp ; 'appears in the message):
<Comment2>FUNDED PORTION & CPN ON 2002561M - RMS 53359729</Comment2>
Parsing of message is failing even the message has ( ' & amp ; ') in the xml
tag value.
"Aaron Bertrand [SQL Server MVP]" wrote:
Escaping means switching out character sequences so they are accepted by
validators etc. HTML and XML have a very similar set of characters which
are "special" and so need to be escaped or encoded to prevent being
misinterpreted. For the ampersand, you can try this string instead:
<Comment2>FUNDED PORTION & CPN ON 2002561M - RMS 53359729</Comment2>
On 7/1/09 1:10 PM, in article
17E12CD6-85CD-45A9-A586-15EFBF363A1A@xxxxxxxxxxxxx, "Sandeep"
<Sandeep@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
Thanks for your response.
Could you please provide more details.
This is the xml tag <Comment2>FUNDED PORTION & CPN ON 2002561M - RMS
53359729</Comment2> in the incoming message and I am trying to insert the
same into table's column whose datatype is xml.
"Aaron Bertrand [SQL Server MVP]" wrote:
Don't you need to escape special characters like &, <, > etc. if they are
to
appear inside XML tags?
On 7/1/09 12:47 PM, in article
5203BB33-B00F-4B99-900B-8942B463E756@xxxxxxxxxxxxx, "Sandeep"
<Sandeep@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I am using open source Java based application and xslt to insert a
complete
XML message into column of 'xml' datatype in SQL 2005 database.
XML message has & character in one of the tag value.
While inserting this message, my application throw exception
"java.sql.SQLException: XML parsing: line 4, character 1346, illegal
name
character"
When I change the column datatype from 'xml' to 'text', the same message
get
inserted into table. And I tried to insert same message into Oracle
database
as CLOB and there are no issues.
I used xalan as well as saxon parser and also variouos encoding options
(UTF-8, ISO-8859-1..), however this did not help me.
Any suggestion is highly appreciated.
Thanks in advance.
.
- References:
- XML Parsing: <line >, <character> illegal name character
- From: Sandeep
- Re: XML Parsing: <line >, <character> illegal name character
- From: Aaron Bertrand [SQL Server MVP]
- Re: XML Parsing: <line >, <character> illegal name character
- From: Sandeep
- Re: XML Parsing: <line >, <character> illegal name character
- From: Aaron Bertrand [SQL Server MVP]
- Re: XML Parsing: <line >, <character> illegal name character
- From: Sandeep
- Re: XML Parsing: <line >, <character> illegal name character
- From: Aaron Bertrand [SQL Server MVP]
- Re: XML Parsing: <line >, <character> illegal name character
- From: Sandeep
- XML Parsing: <line >, <character> illegal name character
- Prev by Date: Re: SQL 2008 Intellisense
- Next by Date: Re: SQL 2008 Intellisense
- Previous by thread: Re: XML Parsing: <line >, <character> illegal name character
- Next by thread: Re: XML Parsing: <line >, <character> illegal name character
- Index(es):
Relevant Pages
|
Loading