Hi Murti,
Thank you for your interest in Intel XML libraries, and here is what I have to say regarding your questions.
You can perform parallel XPath evaluations in different threads if you use different XPath & XPathExpression objects to do that.
There are some key points to remember: the C++ XPath interface consists of 3 main classes (XPathFactory, XPath and XPathExpression) and is partially thread-unsafe. XPathFactory objects create XPath objects, and the latter create XPathExpression objects. XPathFactory is partially thread-safe: its setter methods (setXYZ) are not thread-safe, but the rest are. The XPath object and all its created XPathExpression objects are NOT thread-safe. So, it is invalid to run either of these objects in more than one thread. For example, you cannot use one XPath object in multiple threads to evaluate different XPath expressions. This is similar to the Java JAXP interface behavior.
However, it is valid to use different XPath and XPathExpression objects in different threads to evaluate different XPath expressions, as long as such objects are local to each thread and all XPathExpression objects are used in the same thread as their parent XPath object.
To utilize multiple cores, you need to create multiple threads and thread-local XPath and XPathExpression objects in each thread to evaluate different XPath expressions.
I hope this helps.