I am looking for an overload with above mentioned signature.
I need to load from an XmlDocument
because loading from the owl file directly or via a Stream results in an Error:
"The input document has exceeded a limit set by MaxCharactersFromEntities."
Is there something obvious which I am not aware of?
Thanks, Jan
Edit 1 - Adding code showing exception
I try to parse the cell line ontology (~100MB). Because I need only some specific content, I would like to use a handler to focus on the interesting stuff. For demonstartion of my issue, I use the CountHandler
private static void loadCellLineOntology()
{
try
{
var settings = new System.Xml.XmlReaderSettings()
{
MaxCharactersFromEntities = 0,
DtdProcessing = System.Xml.DtdProcessing.Parse
};
var doc = new System.Xml.XmlDocument();
var parser = new VDS.RDF.Parsing.RdfXmlParser(VDS.RDF.Parsing.RdfXmlParserMode.DOM);
//using (var stream = new System.IO.FileStream(@"C:\Users\jan.hummel\Downloads\clo.owl", System.IO.FileMode.Open))
//using (var reader = System.Xml.XmlReader.Create(stream, settings))
using (IGraph g = new NonIndexedGraph())
{
//doc.Load(reader);
//parser.Load(g, @"C:\Users\jahu\Downloads\clo.owl");
var handler = new VDS.RDF.Parsing.Handlers.CountHandler();
parser.Load(handler, @"C:\Users\jahu\Downloads\clo.owl");
//parser.Load(handler, doc);
}
}
catch (Exception ex)
{
Debugger.Break();
}
}