The process uses FOR XML to send an XML document to C# which builds a string
and simply turns around and sends it as a parameter to a stored procedure in
an external SQL Server. The destination SQL Server returns "XML parsing
error: An Invalid character was found in text content." Manually changing
the "á" to an "a" fixes the problem. Maybe it's a setting in the OPENXML
statement in the destination stored procedure? I'm not really sure at this
point.
"Michael Rys [MSFT]" wrote:
> What encoding does your XML document pretend to have? Note that FOR XML
> returns the data in UTF-16 encoding (unless you set a different output
> encoding on the provider).
>
> How do you get the XML back?
>
> Thanks
> Michael
>
> "mfairchild" wrote in message
>
> > To be more specific, I'm creating an XML document with an attribute that
> > has
> > a value similar to "Háaleitisbraut" and the special character is causing
> > an
> > error downstream.
> >
> > "mfairchild" wrote:
> >
> >> Maybe I missed something simple, but is there a way to URLEncode the data
> >> generated by FOR XML EXPLICIT within the SQL statement itself?
>
>
> >> Stay informed about: URLEncode with FOR XML Explicit