Subject: writing into xml file
Posted By: jerryjohn Post Date: 8/18/2006 12:59:20 AM
Hi
  I am working in c#.net. I have a text file with few lines of data.
Eg:-
MSH|^~\$|ADMIT|CLAY COUNTY MEMORIAL||
EVN|A01|200502110909||  

| is the delimiter. I want to parse the values within the delimiter into the xml file to its corresponding tags. I want to dynamically get the name of the tags (say using loops) and assign the values from the text file to it. I have already used methods like xml.WriteStartElement and also used dataset. Since this is similar to hard coding ,I want you to suggest a different method.

Thank you.



Reply By: mhkay Reply Date: 8/18/2006 2:40:56 AM
It's very easy to tackle this problem in XSLT 2.0, but I don't know if that's an option for you. It's probably a lot less code than doing it in C#.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Go to topic 48514

Return to index page 200
Return to index page 199
Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193
Return to index page 192
Return to index page 191