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
* 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/
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/