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: Mon, 26 May 2008 07:01:11 -0700 (PDT),    group: microsoft.public.xsl        back       


I need to replace the single quote ‘ by the double quote “ in <?xml version='1.0' encoding='UTF-8' ?>   
I use xsl to transform xml data



I use the following command in the xsl:

<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no"
indent="yes"/>



Which generates the following line in the output xml

<?xml version='1.0' encoding='UTF-8' ?>





I need to replace the single quote ‘ by the double quote “
date: Mon, 26 May 2008 07:01:11 -0700 (PDT)   author:   unknown

I need to replace the single quote ‘ by the double quote “ in <?xml version='1.0' encoding='UTF-8' ?>Re:   
* heshamelesawy@gmail.com wrote in microsoft.public.xsl:
>Which generates the following line in the output xml
>
><?xml version='1.0' encoding='UTF-8' ?>
>
>I need to replace the single quote ‘ by the double quote “

This should never be necessary, if you have to do this for some external
application, you should contact the developer of the application to fix
this problem. There is no method to control this in XSLT, you would have
to use a special serializer to generate this form, or use some post-pro-
cessing tool. Given the position and format of the XML declaration, it'd
be easy to use a sed-like tool to make the change.
-- 
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: Mon, 26 May 2008 16:29:48 +0200   author:   Bjoern Hoehrmann

‘ by the double quote “ in <?xml version='1.0' encoding='UTF-8' ?>Re: I need to replace the single quote   
heshamelesawy@gmail.com wrote:

> I use the following command in the xsl:
> 
> <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no"
> indent="yes"/>
> 
> 
> 
> Which generates the following line in the output xml
> 
> <?xml version='1.0' encoding='UTF-8' ?>

> I need to replace the single quote ‘ by the double quote “

Why do you need to do that? Both quote characters are allowed by the XML 
specification.

If you want to do it with .NET then you can try to use an XmlTextWriter 
for serialization where you set the QuoteChar property as needed: 
http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter.quotechar.aspx

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Mon, 26 May 2008 18:21:28 +0200   author:   Martin Honnen

Google
 
Web ureader.com


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