From 5c7a8b44b9b4c7ff4a00d107d9af6ff40ac629c9 Mon Sep 17 00:00:00 2001 From: jez <> Date: Fri, 4 Aug 2006 09:53:06 +0000 Subject: [PATCH] work with Nodes rather than elements --- examples/XPath/xgrep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/XPath/xgrep.cpp b/examples/XPath/xgrep.cpp index eb6a763b..cdbdf317 100644 --- a/examples/XPath/xgrep.cpp +++ b/examples/XPath/xgrep.cpp @@ -55,6 +55,7 @@ int main(int argc, char* argv[]) if(!eh.errorsReported()) { DOM::Document doc = domParser.getDocument(); + // doc.normalize(); Arabica::XPath::XPathValuePtr result; result = xpath->evaluate(doc); if(result->asBool()) @@ -65,7 +66,7 @@ int main(int argc, char* argv[]) const Arabica::XPath::NodeSet& ns = result->asNodeSet(); for(unsigned int i = 0; i < ns.size(); ++i) { - DOM::Element n = static_cast >(ns[i]); + DOM::Node n = ns[i]; std::cout << n << std::endl; } } // if ..