summaryrefslogtreecommitdiff
path: root/src/pugixml.hpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-18 11:44:57 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-01-18 11:44:57 +0000
commitf57ab5289453e8323dc0aca03ee94fb5ee6ac696 (patch)
treeb44be2108c1a1e6693b7714c658ce98884afdd45 /src/pugixml.hpp
parent9bc19368f2fe81fec271c57ac1583c6a9eb1d014 (diff)
Added offset_debug
git-svn-id: http://pugixml.googlecode.com/svn/trunk@108 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.hpp')
-rw-r--r--src/pugixml.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pugixml.hpp b/src/pugixml.hpp
index 3e6aa3d..5b9b5c7 100644
--- a/src/pugixml.hpp
+++ b/src/pugixml.hpp
@@ -1210,6 +1210,16 @@ namespace pugi
* \param depth - starting depth (used for indentation)
*/
void print(xml_writer& writer, const char* indent = "\t", unsigned int flags = format_default, unsigned int depth = 0);
+
+ /**
+ * Get node offset in parsed file/string (in bytes) for debugging purposes
+ *
+ * \return offset in bytes to start of node data, or -1 in case of error
+ * \note This will return -1 if node information changed to the extent that it's no longer possible to calculate offset, for example
+ * if element node name has significantly changed; this is guaranteed to return correct offset only for nodes that have not changed
+ * since parsing.
+ */
+ int offset_debug() const;
};
#ifdef __BORLANDC__