diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/source/xmltesttools.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index 45347b0c111b..c3e314e49ed4 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -88,7 +88,12 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath) xmlXPathNodeSetGetLength(pXmlNodes) > 0); xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0]; - OUString s(convert((pXmlNode->children[0]).content)); + xmlNodePtr pXmlChild = pXmlNode->children; + OUString s; + while (pXmlChild && pXmlChild->type != XML_TEXT_NODE) + pXmlChild = pXmlChild->next; + if (pXmlChild && pXmlChild->type == XML_TEXT_NODE) + s = convert(pXmlChild->content); xmlXPathFreeObject(pXmlObj); return s; } |