- /**
- * Callback for a fatal XML parsing error.
- *
- * The XML parser will use this method to report any fatal errors
- * during parsing. Once the first error callback is received,
- * normal processing will stop, though additional errors may be
- * reported. The application should take any appropriate
- * error-handling procedures when it receives this callback, and
- * should not attempt to use any of the data found in the XML
- * document.
- *
- * @param message The error message from the parser.
- * @param line The number of the line that generated the error.
- * @param column The character position in the line that generated
- * the error.
+ /** Get the path to the parsed file.
+ *
+ * This method will be called if the application needs to access the path to
+ * the parsed file. This information is typically needed if an error is found
+ * so the file where it occurred can be retrieved to help the user locate the
+ * error.
+ *
+ * @return the path to the parsed file.
+ * @see #setPath
+ */
+ const std::string& getPath(void) const { return path; }
+
+ /** Save the current position in the parsed file.
+ *
+ * This method will be called to save the position at which the file is
+ * currently parsed. Note that the XML parser makes no use of that
+ * information. The intent is to be capable of refering to the position in
+ * the parsed file if needed.
+ *
+ * @see #getColumn
+ * @see #getLine
+ */
+ void savePosition(void);
+
+ /** Get the saved column number in the parsed file.
+ *
+ * This method will be called if the application needs to get the column
+ * number that has been saved during the last call to savePosition(). This
+ * information is typically needed if an error is found so the position at
+ * which it occurred can be retrieved to help the user locate the error.
+ *
+ * @return the save column number.
+ * @see #savePosition
+ */
+ int getColumn(void) const { return column; }
+
+ /** Get the saved line number in the parsed file.
+ *
+ * This method will be called if the application needs to get the line
+ * number that has been saved during the last call to savePosition(). This
+ * information is typically needed if an error is found so the position at
+ * which it occurred can be retrieved to help the user locate the error.
+ *
+ * @return the save line number.
+ * @see #savePosition
+ */
+ int getLine(void) const { return line; }
+
+ /** Set the XML parser.
+ *
+ * This method will be called so the #XMLVisitor instance can internally use
+ * the XML parser for its housekeeping. The intent is that #XMLVisitor will
+ * only call the reporting functions of the XML parser and will not interfer
+ * with the XML parser current state. Doing otherwise will result in an
+ * unpredictable behavior of the XML parser.
+ *
+ * @param _parser the XML parser