From cd65d6c06760caf0109664d2a320cfb29d634ab2 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Sun, 17 Jan 2021 00:08:08 +0900 Subject: tools: support reading xml namespace with XmlWalker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tools/source/xml/XmlWalker.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/source/xml') 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(mpImpl->mpCurrent->name); } +OString XmlWalker::namespaceHref() +{ + return reinterpret_cast(mpImpl->mpCurrent->ns->href); +} + +OString XmlWalker::namespacePrefix() +{ + return reinterpret_cast(mpImpl->mpCurrent->ns->prefix); +} + OString XmlWalker::content() { OString aContent; -- cgit