This project has moved. For the latest updates, please go here.


Error while parsing XML CCD documents


I am trying to parse a CCD document.
I included all the dll files of the everest framework.

The code that I am using is :
using (XmlStateReader xr = new XmlStateReader(XmlReader.Create(@"E:\AllComponents-ccd.xml")))
                var fmtr = new XmlIts1Formatter();
                fmtr.ValidateConformance = false;
                fmtr.GraphAides.Add(new ClinicalDocumentDatatypeFormatter());
                var parseResult = fmtr.Parse(xr, typeof(ClinicalDocument));
                // There is a variable called structure which will contain your
                var cda = parseResult.Structure as ClinicalDocument;
       = cda;
But I am getting the error :
Error   1   The type or namespace name 'XmlStateReader' could not be found (are you missing a using directive or an assembly reference?)
I also tried the code :
XmlIts1Formatter fmtr = new XmlIts1Formatter();
            fmtr.GraphAides.Add(new DatatypesR1Formatter(R1FormatterCompatibilityMode.ClinicalDocumentArchitecture));
            fmtr.ValidateConformance = false;
            ClinicalDocument doc = null;
            using(FileStream fs = File.OpenRead("E:\\AllComponents-ccd.xml"))
                IFormatterParseResult result = fmtr.Parse(fs);
                doc = result.Structure as ClinicalDocument;

            // Do stuff with doc object here.
But similar error occurred for DatatypesR1Formatter
Closed Nov 12, 2015 at 12:29 PM by jf03cg


ashishjack wrote Oct 26, 2015 at 6:53 AM

Had to include xml module.
Please remove the issue.