|
|
|
start date: Mon, 20 Aug 2007 16:56:01 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
msdnuser am
|
|
2
Göran Andersson
|
|
3
msdnuser am
|
|
4
msdnuser am
|
|
5
Göran Andersson
|
Issue with double quotes in xml used in a ASP.Net page
Hi All,
A piece of XML is stored in sql server; retrieved; different UI fields are
filled with appropriate data by fetching data from xml which is stored in sql.
Usually the UI fields after modification are processed; stored in
xmldocument variable; eventually stored in db.
Now one of the UI fields has double quote in the text that it contains.
Now my question is in our development environment , the above mentioned
attribute is replaced with " in the xml document saved to db. But in another
environment it is saved as " itself which is causing problems. When the users
try to open the record next time it throws xml exception.
What is the problem? xml parser? or .net or something else?
recently we switched from 1.1 to 2.0.
Please throw some light on this issue.
Thanks.
Date:Mon, 20 Aug 2007 16:56:01 -0700
Author:
|
Re: Issue with double quotes in xml used in a ASP.Net page
msdnuser wrote:
> Hi All,
>
> A piece of XML is stored in sql server; retrieved; different UI fields are
> filled with appropriate data by fetching data from xml which is stored in sql.
>
> Usually the UI fields after modification are processed; stored in
> xmldocument variable; eventually stored in db.
>
> Now one of the UI fields has double quote in the text that it contains.
>
> Now my question is in our development environment , the above mentioned
> attribute is replaced with " in the xml document saved to db. But in another
> environment it is saved as " itself which is causing problems.
I fail to see the difference between " and ".
> When the users
> try to open the record next time it throws xml exception.
>
> What is the problem? xml parser? or .net or something else?
>
> recently we switched from 1.1 to 2.0.
>
> Please throw some light on this issue.
>
> Thanks.
--
Göran Andersson
_____
http://www.guffa.com
Date:Tue, 21 Aug 2007 10:31:37 +0200
Author:
|
Re: Issue with double quotes in xml used in a ASP.Net page
The first double quote that I have mentioned in my message is """.
"Göran Andersson" wrote:
> msdnuser wrote:
> > Hi All,
> >
> > A piece of XML is stored in sql server; retrieved; different UI fields are
> > filled with appropriate data by fetching data from xml which is stored in sql.
> >
> > Usually the UI fields after modification are processed; stored in
> > xmldocument variable; eventually stored in db.
> >
> > Now one of the UI fields has double quote in the text that it contains.
> >
> > Now my question is in our development environment , the above mentioned
> > attribute is replaced with " in the xml document saved to db. But in another
> > environment it is saved as " itself which is causing problems.
>
> I fail to see the difference between " and ".
>
> > When the users
> > try to open the record next time it throws xml exception.
> >
> > What is the problem? xml parser? or .net or something else?
> >
> > recently we switched from 1.1 to 2.0.
> >
> > Please throw some light on this issue.
> >
> > Thanks.
>
>
> --
> Göran Andersson
> _____
> http://www.guffa.com
>
Date:Tue, 21 Aug 2007 09:20:05 -0700
Author:
|
Re: Issue with double quotes in xml used in a ASP.Net page
Sorry it again converts it to just double quotes. What I am trying to say is
that in my dev environment double quote is stored as "ampersand double quote
semicolon". But in other environments its stored as double quote itself.
"msdnuser" wrote:
> The first double quote that I have mentioned in my message is """.
>
> "Göran Andersson" wrote:
>
> > msdnuser wrote:
> > > Hi All,
> > >
> > > A piece of XML is stored in sql server; retrieved; different UI fields are
> > > filled with appropriate data by fetching data from xml which is stored in sql.
> > >
> > > Usually the UI fields after modification are processed; stored in
> > > xmldocument variable; eventually stored in db.
> > >
> > > Now one of the UI fields has double quote in the text that it contains.
> > >
> > > Now my question is in our development environment , the above mentioned
> > > attribute is replaced with " in the xml document saved to db. But in another
> > > environment it is saved as " itself which is causing problems.
> >
> > I fail to see the difference between " and ".
> >
> > > When the users
> > > try to open the record next time it throws xml exception.
> > >
> > > What is the problem? xml parser? or .net or something else?
> > >
> > > recently we switched from 1.1 to 2.0.
> > >
> > > Please throw some light on this issue.
> > >
> > > Thanks.
> >
> >
> > --
> > Göran Andersson
> > _____
> > http://www.guffa.com
> >
Date:Tue, 21 Aug 2007 09:32:05 -0700
Author:
|
Re: Issue with double quotes in xml used in a ASP.Net page
msdnuser wrote:
> Sorry it again converts it to just double quotes.
The term "double quote" is a bit misleading. A quotation mark is ", so a
double quote would be "". The ' character is apostrophe, so " would
rather be "double apostrophe" than "double quote".
(Strictly speaking, " is the character for the inch unit, and ' is the
character for feet unit, but they are used instead of the quotation mark
and apostrophe, as they are not available on a standard keyboard.)
> What I am trying to say is
>
> that in my dev environment double quote is stored as "ampersand double quote
> semicolon". But in other environments its stored as double quote itself.
Neither is correct in an xml document. A quotation mark in a value
should be encoded as " ( & q u o t ; ).
If quotation marks are improperly encoded or not encoded at all, the xml
is invalid, and it's likely that it's impossible to parse it using
normal methods.
--
Göran Andersson
_____
http://www.guffa.com
Date:Tue, 21 Aug 2007 21:33:13 +0200
Author:
|
|
|