p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   from color="red" to color='red' (http://p2p.wrox.com/showthread.php?t=21128)

juaniux November 11th, 2004 07:04 PM

from color="red" to color='red'
I need to copy an xml document and replace the double quotes that surround attribute values with single quotes.

From: <?xml version="1.0"?>

To: <?xml version='1.0'?>


joefawcett November 12th, 2004 04:58 AM

Not possible with msxml, what parsers/processors can you use?
Strictly speaking it shouldn't matter so is outside of the XSLT domain. You could parse the document as a straight text file and use regular expressions. You would also have to cope with single quotes within the value and replace these with

Why do you need to do this, sounds abit mis-guided?


Joe (Microsoft MVP - XML)

juaniux November 16th, 2004 04:18 PM

The reason is I need to read a small xml document onto a string using javascript. And my javascript didn't like the double quotes.

Ideally I would like to convert a node-set to string within the xslt.

All times are GMT -4. The time now is 07:10 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.