-// Copyright (C) 2013 CEA/DEN, EDF R&D
+// Copyright (C) 2013-2015 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
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)
{
std::string version = readStringProp(xaoNode, C_ATTR_XAO_VERSION, false, "");
if (version != "")
- xaoObject->setAuthor(version);
+ xaoObject->setVersion(version);
std::string author = readStringProp(xaoNode, C_ATTR_XAO_AUTHOR, false, "");
xaoObject->setAuthor(author);
int component = readIntegerProp(valNode, C_ATTR_VALUE_COMPONENT, true, -1);
xmlChar* data = xmlNodeGetContent(valNode->children);
- std::string value = (char*)data;
+ std::string value;
if (data != NULL)
{
value = (char*)data;
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)
{
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)
{