c# - Convert XML to Plain Text -


itemprop = "text">

My goal is to create an engine that takes the latest HL 7 3.0 CDA documents and with HL 7 2.5 Behind backward compatible creates a fundamentally different animal.

The CDA document is an XML file, which is matched with its matching XSL file, which provides an HTML document fit to show the end user.

In HL7 2.5, I need to get the rendered text, devoid of any markup, and to distribute it in a text stream (or similar), which I used to 80 to 80 to populate the HL7 2.5 message I can write in letter lines.

So far, using XSLCompiledTransform is taking an approach to using XSLT and using a resulting HTML document.

My next step is to take that document (or perhaps earlier in one step) and present HTML as text in HTML. I've searched for a while, but how it can be completed, I'm just hoping that I'm just ignoring it or just can not find magical search words. Can anyone help you?

FWW, I've read 5 or 10 other questions, which embrace or recommend using RegX for this matter, and do not think that I want to go down that road. I need sung lessons.

  using the system; Using System.IO; Using System.Xml; Using System.Xml.Xsl; Using System.Xml.XPath; Public Class TransformXML {Public Fixed Zero Main (String [] ARGs) {try {string sourceDoc = "C: \\ CDA_Doc.xml"; String result disk = "c: \\ RESULT.html"; String xsltDoc = "C: \\ CDA.xsl"; XPathDocument myXPathDocument = New XPathDocument (sourceDoc); XslCompiledTransform myXslTransform = New XslCompiledTransform (); XmlTextWriter Author = New XMLTextWriter (ResultsDisk, Empty); MyXslTransform.Load (xsltDoc); MyXslTransform.Transform (myXPathDocument, blank, author); Writer.Close (); Streamer streamer = new streamrider (effect); } Hold (exception e) {Console.WriteLine ("exception: {0}", e.ToString ()); Since you have an XML source, consider writing xls which will give you i want output without intermediate html step. This would be far more reliable than trying to replace HTML. 


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -