mirror of https://github.com/QMCPACK/qmcpack.git
If cur specified in OhmmsXPathObject, set cur as context.
git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6235 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
parent
797826a26d
commit
f2a1225dc4
|
@ -19,6 +19,7 @@
|
|||
#include "Message/Communicate.h"
|
||||
#include "Utilities/Timer.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
OhmmsXPathObject::OhmmsXPathObject(): NumObjects(0), result(NULL),m_context(NULL)
|
||||
{
|
||||
|
@ -30,9 +31,12 @@ OhmmsXPathObject::OhmmsXPathObject(const char* expression,
|
|||
put(expression, context);
|
||||
}
|
||||
|
||||
OhmmsXPathObject::OhmmsXPathObject(const char* expression, xmlNodePtr cur) :NumObjects(0), result(NULL)
|
||||
OhmmsXPathObject::OhmmsXPathObject(const char* expression, xmlNodePtr cur) :NumObjects(0), result(NULL), m_context(NULL)
|
||||
{
|
||||
m_context= xmlXPathNewContext(cur->doc);
|
||||
//sets up "cur" as the context, and will return matches within this node
|
||||
// if not overridden in "expression".
|
||||
xmlXPathSetContextNode(cur, m_context);
|
||||
put(expression, m_context);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "OhmmsData/libxmldefs.h"
|
||||
#include <string>
|
||||
/** class to handle xmlXPathObject
|
||||
*/
|
||||
*/
|
||||
struct OhmmsXPathObject
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue