summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:22:54 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-08-29 15:22:54 +0000
commit053a4c0ea79fa2b18d693ad683b8dd22ffea9f49 (patch)
tree7f6d044ea636a66ce03c14b2fc8df692a380097e /src/pugixml.hpp
parent0c5b9341bc7c49ebfba2da0e52dd9cda96f2931c (diff)
XPath: Introduced new evaluate_string API (without STL), enabled XPath without STL
git-svn-id: http://pugixml.googlecode.com/svn/trunk@659 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index d3dfea6..cb6180c 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -56,11 +56,6 @@ namespace std
# endif
#endif
-// No XPath without STL
-#if !defined(PUGIXML_NO_XPATH) && defined(PUGIXML_NO_STL)
-# define PUGIXML_NO_XPATH
-#endif
-
// Include exception header for XPath
#if !defined(PUGIXML_NO_XPATH) && !defined(PUGIXML_NO_EXCEPTIONS)
# include <exception>
@@ -2017,6 +2012,7 @@ namespace pugi
*/
double evaluate_number(const xml_node& n) const;
+ #ifndef PUGIXML_NO_STL
/**
* Evaluate expression as string value for the context node \a n.
* If expression does not directly evaluate to string, the expression result is converted
@@ -2027,8 +2023,20 @@ namespace pugi
* \return evaluation result
*/
string_t evaluate_string(const xml_node& n) const;
+ #endif
/**
+ * Evaluate expression as string value for the context node \a n.
+ * If expression does not directly evaluate to string, the expression result is converted
+ * as through string() XPath function call.
+ * Throws std::bad_alloc on out of memory error.
+ *
+ * \param n - context node
+ * \return evaluation result
+ */
+ size_t evaluate_string(char_t* buffer, size_t capacity, const xml_node& n) const;
+
+ /**
* Evaluate expression as node set for the context node \a n.
* If expression does not directly evaluate to node set, throws xpath_exception.
* Throws std::bad_alloc on out of memory error.