From e2c5763d1f5d5cf04b99c7acd0bbeba188b00759 Mon Sep 17 00:00:00 2001 From: Jaron Krogel Date: Wed, 21 Jan 2015 19:55:45 +0000 Subject: [PATCH] enable reads of "large" (>10MB) gaussian wfs. restricts us to libxml 2.7+ git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6423 e5b18d87-469d-4833-9cc0-8cdfa06e9491 --- src/OhmmsData/Libxml2Doc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/OhmmsData/Libxml2Doc.cpp b/src/OhmmsData/Libxml2Doc.cpp index f0765f52c..98591a2e2 100644 --- a/src/OhmmsData/Libxml2Doc.cpp +++ b/src/OhmmsData/Libxml2Doc.cpp @@ -189,7 +189,13 @@ bool Libxml2Document::parse(const std::string& xmlfile) { if(m_doc != NULL) xmlFreeDoc(m_doc); - m_doc = xmlParseFile(xmlfile.c_str()); + + // read xml document w/o memory limits + // note that XML_PARSE_HUGE is part of an enum in libxml2 + // it is only available in libxml 2.7+ + m_doc = xmlReadFile(xmlfile.c_str(),NULL,XML_PARSE_HUGE); + //m_doc = xmlParseFile(xmlfile.c_str()); + if (m_doc == NULL) { return false;