111 cmnXMLPathData * Data;
118 virtual ~cmnXMLPath();
122 void SetInputSource(
const char * filename);
123 void SetInputSource(
const std::string & fileName);
128 bool ValidateWithSchema(
const char * filename);
129 bool ValidateWithSchema(
const std::string & fileName);
136 const std::string & GetLastErrors(
void)
const;
140 bool SaveAs(
const char * filename)
const;
141 bool SaveAs(
const std::string & fileName)
const;
145 void PrintValue(std::ostream & out,
const char * context,
const char * XPath);
149 bool GetXMLValue(
const char * context,
const char * XPath,
bool & value);
150 bool GetXMLValue(
const char * context,
const char * XPath,
bool & value,
const bool & valueIfMissing);
151 bool SetXMLValue(
const char * context,
const char * XPath,
const bool & value);
152 bool Query(
const char * query,
bool & value);
157 bool GetXMLValue(
const char * context,
const char * XPath,
int & value);
158 bool GetXMLValue(
const char * context,
const char * XPath,
int & value,
const int & valueIfMissing);
159 bool SetXMLValue(
const char * context,
const char * XPath,
const int & value);
160 bool Query(
const char * query,
int & value);
165 bool GetXMLValue(
const char * context,
const char * XPath,
double & value);
166 bool GetXMLValue(
const char * context,
const char * XPath,
double & value,
const double & valueIfMissing);
167 bool SetXMLValue(
const char * context,
const char * XPath,
const double & value);
168 bool Query(
const char * query,
double & value);
173 bool GetXMLValue(
const char * context,
const char * XPath, std::string & value);
174 bool GetXMLValue(
const char * context,
const char * XPath, std::string & value,
const std::string & valueIfMissing);
175 bool SetXMLValue(
const char * context,
const char * XPath,
const std::string & value);
176 bool Query(
const char * query, std::string & value);
181 template <
class __elementType>
182 bool GetXMLValue(
const std::string & context,
const std::string & XPath, __elementType & value) {
183 return this->GetXMLValue(context.c_str(), XPath.c_str(), value);
186 template <
class __elementType>
187 bool GetXMLValue(
const std::string & context,
const std::string & XPath, __elementType & value,
const __elementType & valueIfMissing) {
188 return this->GetXMLValue(context.c_str(), XPath.c_str(), value, valueIfMissing);
191 template <
class __elementType>
192 bool SetXMLValue(
const std::string & context,
const std::string & XPath,
const __elementType & value)
194 return this->SetXMLValue(context.c_str(), XPath.c_str(), value);
197 template <
class __elementType>
198 bool Query(
const std::string & query, __elementType & value) {
199 return this->Query(query.c_str(), value);
206 #endif // CISST_HAS_XML
208 #endif // _cmnXMLPath_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Base class for high level objects.
Definition: cmnGenericObject.h:51
Defines cmnGenericObject.
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Macros to export the symbols of cisstCommonXML (in a Dll).
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition: cmnClassRegisterMacros.h:202
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76