summaryrefslogtreecommitdiff
path: root/tools/source/xml
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-01-17 00:08:08 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-01-17 01:07:29 +0100
commitcd65d6c06760caf0109664d2a320cfb29d634ab2 (patch)
treece825ea5ba5bc86ae6e9b2c38cfe06e546df3452 /tools/source/xml
parenteecedf21f4869dd52a6498377e35d85d2321ac80 (diff)
tools: support reading xml namespace with XmlWalker
Adds methods namespaceHref and namespacePrefix for reading the current element's namespace prefix and the href. Change-Id: I1c16857c6fc0bdfde2d983d8f42f153111119029 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109442 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'tools/source/xml')
-rw-r--r--tools/source/xml/XmlWalker.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx
index 219bf10c8bb5..34a3d8746f6b 100644
--- a/tools/source/xml/XmlWalker.cxx
+++ b/tools/source/xml/XmlWalker.cxx
@@ -61,6 +61,16 @@ bool XmlWalker::open(SvStream* pStream)
OString XmlWalker::name() { return reinterpret_cast<const char*>(mpImpl->mpCurrent->name); }
+OString XmlWalker::namespaceHref()
+{
+ return reinterpret_cast<const char*>(mpImpl->mpCurrent->ns->href);
+}
+
+OString XmlWalker::namespacePrefix()
+{
+ return reinterpret_cast<const char*>(mpImpl->mpCurrent->ns->prefix);
+}
+
OString XmlWalker::content()
{
OString aContent;