Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Thu, 26 Jun 2008 16:02:43 +0100,    group: microsoft.public.xml        back       


Attribute Value Illegal Characters   
Hi there,

I'm trying to strip out illegal characters for XML attribute values from a 
string.  Any idea where I can get a list of said characters?  I've checked 
the specification but it does not have such a list as far as I can see.

Many thanks for your time.

Nick.
date: Thu, 26 Jun 2008 16:02:43 +0100   author:   Nick

Re: Attribute Value Illegal Characters   
Nick wrote:

> I'm trying to strip out illegal characters for XML attribute values from a 
> string.  Any idea where I can get a list of said characters?  I've checked 
> the specification but it does not have such a list as far as I can see.

Characters that are illegal in XML in general do not differ from those 
that are illegal in attribute values, see 
http://www.w3.org/TR/xml/#charsets for the allowed characters in XML 1.0.

Then there are characters that need to be escaped in character data, the 
'<' and the '&', and for attribute values additionally depending on the 
quote character you need to escape the double quote or the single quote 
character.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Thu, 26 Jun 2008 17:59:52 +0200   author:   Martin Honnen

Re: Attribute Value Illegal Characters   
* Nick wrote in microsoft.public.xml:
>I'm trying to strip out illegal characters for XML attribute values from a 
>string.  Any idea where I can get a list of said characters?  I've checked 
>the specification but it does not have such a list as far as I can see.

It must be one of http://www.w3.org/TR/xml/#NT-Char and you have to
escape <, &, and ' or " depending on which you use to delimit the value.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
date: Thu, 26 Jun 2008 18:02:10 +0200   author:   Bjoern Hoehrmann

Re: Attribute Value Illegal Characters   
Hi Martin,

    Thanks a million for your help that's most appreciated.

Nick.

"Martin Honnen"  wrote in message 
news:ewSytW61IHA.4668@TK2MSFTNGP02.phx.gbl...
> Nick wrote:
>
>> I'm trying to strip out illegal characters for XML attribute values from 
>> a string.  Any idea where I can get a list of said characters?  I've 
>> checked the specification but it does not have such a list as far as I 
>> can see.
>
> Characters that are illegal in XML in general do not differ from those 
> that are illegal in attribute values, see 
> http://www.w3.org/TR/xml/#charsets for the allowed characters in XML 1.0.
>
> Then there are characters that need to be escaped in character data, the 
> '<' and the '&', and for attribute values additionally depending on the 
> quote character you need to escape the double quote or the single quote 
> character.
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
date: Thu, 26 Jun 2008 18:05:52 +0100   author:   Nick

Re: Attribute Value Illegal Characters   
Hi Bjoern,

    Thanks a million for your help also, that's most appreciated, I have all 
the info I need now, thanks :)

Nick.

"Bjoern Hoehrmann"  wrote in message 
news:q7f764pqdi0p334ufnqpa5t70ke4qag2j7@hive.bjoern.hoehrmann.de...
>* Nick wrote in microsoft.public.xml:
>>I'm trying to strip out illegal characters for XML attribute values from a
>>string.  Any idea where I can get a list of said characters?  I've checked
>>the specification but it does not have such a list as far as I can see.
>
> It must be one of http://www.w3.org/TR/xml/#NT-Char and you have to
> escape <, &, and ' or " depending on which you use to delimit the value.
> -- 
> Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
> Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
date: Thu, 26 Jun 2008 18:06:29 +0100   author:   Nick

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us