Click here to Skip to main content
15,908,834 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i convereted a raw xml into another xml file using xslt.
instead of storing it as a file can i store the xml data in a string
Posted
Comments
Sergey Alexandrovich Kryukov 9-Aug-12 16:19pm    
Makes no sense.
--SA

Apparently you are not the only one that ever wanted to do this.
I found an article explaining the topic here :
http://discuss.joelonsoftware.com/default.asp?dotnet.12.310872.6[^]
 
Share this answer
 
Comments
ap121976 10-Aug-12 9:57am    
thanks philip ..i used xslt 2.0 using saxon so i need more info
XML data is already a string. If it should be a different string, you should specify all the detail. The request makes no sense.

—SA
 
Share this answer
 
You can read this article on MSDN Page[^]

Regards
 
Share this answer
 
Comments
Christian Amado 9-Aug-12 13:56pm    
At least, Have you see the example? Because the example returns a string as you wish.
ap121976 10-Aug-12 9:56am    
yeap i did thanks
You can read it in to a string:
C#
using System.IO;

/* ... */

String xmlText = File.ReadAllText(@"path\to\your\file.xml");
 
Share this answer
 
Comments
Kenneth Haugland 9-Aug-12 13:41pm    
Pricise, a 5!
ap121976 9-Aug-12 13:53pm    
thanks but i dont want to store it in a file, i want the output directly passed to a string
lewax00 9-Aug-12 13:56pm    
Probably, but it's hard to say, I don't know what you're using to convert it. If not, storing it in a temporary file shouldn't be an issue.
StianSandberg 9-Aug-12 15:36pm    
5'd
Sergey Alexandrovich Kryukov 9-Aug-12 16:18pm    
Exactly, my 5, but in my answer I explicitly explained the request makes no sense, please see.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900