Hi,
I have written the
following code,
XalanSourceTreeInit
theSourceTreeInit;
....
....
try {
XALAN_USING_XERCES(MemBufInputSource)
MemBufInputSource inStream((XMLByte*)xmlFile, strlen(xmlFile), "Parser", false);
const XalanDOMString errorStr;
theLiaisonPtr->setExitOnFirstFatalError(strictValue);
....
....
try {
XALAN_USING_XERCES(MemBufInputSource)
MemBufInputSource inStream((XMLByte*)xmlFile, strlen(xmlFile), "Parser", false);
const XalanDOMString errorStr;
theLiaisonPtr->setExitOnFirstFatalError(strictValue);
theLiaisonPtr->setIncludeIgnorableWhitespace(allowBins);
theLiaisonPtr->setUseValidation(Validate);
theDocumentPtr = theLiaisonPtr->parseXMLStream(inStream);
theLiaisonPtr->setUseValidation(Validate);
theDocumentPtr = theLiaisonPtr->parseXMLStream(inStream);
}
....
//There
is no exception is seen.
XPathEvaluator::initialize();
XPathEvaluator theEvaluator;
XalanNode* const theContextNode=theEvaluator.selectSingleNode(
theDOMSupport,
theDocument ,
XalanDOMString(inXPath.c_str(),
thePrefixResolver);
XPathEvaluator theEvaluator;
XalanNode* const theContextNode=theEvaluator.selectSingleNode(
theDOMSupport,
theDocument ,
XalanDOMString(inXPath.c_str(),
thePrefixResolver);
thecontextNode
returns "0" for any XML file which has a attribute
<?xml
version="1.0" encoding="UTF-8" ?>
<doc xmlns="http://www.xmlmind.com/xmleditor/schema/example2">
<para>Ancient India</para>
</doc>
<doc xmlns="http://www.xmlmind.com/xmleditor/schema/example2">
<para>Ancient India</para>
</doc>
The same XML file
works if I use the following
<doc>
<para>Ancient India</para>
</doc>
<para>Ancient India</para>
</doc>
What could be the
problem ?
Please
help
Regards
-Praveen
Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. |
