Salome HOME
xmlCleanupParser should not be called from the application
[modules/geom.git] / src / XAO / XAO_XaoExporter.cxx
index bd34efafb2354a80167cba36ad47df041bd995b9..f8229318a4a60b41a05d532f6eb893048a0597fe 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2013  CEA/DEN, EDF R&D
+// Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -310,7 +310,7 @@ namespace {
     parseXaoNode(doc, root, xaoObject);
 
     xmlFreeDoc(doc);       // free document
-    xmlCleanupParser();    // free globals
+    //xmlCleanupParser();    // free globals //vsr: xmlCleanupParser should not be called from the application
   }
 
   void parseXaoNode(xmlDocPtr doc, xmlNodePtr xaoNode, Xao* xaoObject)
@@ -636,7 +636,7 @@ const bool XaoExporter::readFromFile(const std::string& fileName, Xao* xaoObject
 throw (XAO_Exception)
 {
     // parse the file and get the DOM
-    int options = XML_PARSE_HUGE || XML_PARSE_NOCDATA;
+    int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA;
     xmlDocPtr doc = xmlReadFile(fileName.c_str(), NULL, options);
     if (doc == NULL)
     {
@@ -650,7 +650,7 @@ throw (XAO_Exception)
 const bool XaoExporter::setXML(const std::string& xml, Xao* xaoObject)
 throw (XAO_Exception)
 {
-    int options = XML_PARSE_HUGE || XML_PARSE_NOCDATA;
+    int options = XML_PARSE_HUGE | XML_PARSE_NOCDATA;
     xmlDocPtr doc = xmlReadDoc(BAD_CAST xml.c_str(), "", NULL, options);
     if (doc == NULL)
     {