Hi,

My problem resolved after I prefixed the node with default namespace, now
selectNodeList retrieves the node. The doc also contains a default namespace
"cid" which was not posted here since i was not too much aware of it (i only
cut and paste a sample doc)

Thanks for the help

Regards
Janardan


David Bertoni wrote:
> 
> On 9/27/2011 10:54 AM, jana957 wrote:
>>
>> Hi,
>> I am new to XalanC++1.10, trying to enhance an application to retrieve
>> new
>> XML nodes for processing. Below is an example XML:
>>
>> Expand|Select|Wrap|Line Numbers
>> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope";
>> xmlns:sd="http://example.org/2008/04/sdee";>
>>    <sd:events>
>>     <sd:evIdsAlert eventId="1234567" vendor="example"
>> severity="low">...</sd:evIdsAlert>
>>     <sd:evIdsAlert eventId="1234568" vendor="example"
>> severity="low">...</sd:evIdsAlert>
>>    <evStatus>
>>    <appname>mainApp</appname>
>>    </evStatus>
>>     </sd:events>
>>    </env:Envelope>
>>
>>
>> Code as described below looks like this:
>>
>>
>> XalanDocumentPrefixResolver resolver(xmldoc);
>>
>> eventNodeList = evaluator.selectNodeList(
>> evntnodeList,
>> domSupport,
>> doc,
>> "/env:Envelope/sd:events/evStatus",
>> prefixResolver);
>> When i use Xalan's "selectNodeList()" with "prefixResolver" instance and
>> "/env:Envelope/sd:events/evStatus" as xpath, it does not return any node.
>> If
>> i give<evIdsAlert>  or<events>  in the xpath, then it returns instances
>> of
>> them.
>>
>> May i please know how can we retrieve non-namespace nodes.
>> Any pointers/help is greatly appreciated.
> 
> I cannot reproduce your problem using the latest code in the repository, 
> but I don't believe much has changed since the 1.10 release.
> 
> Are you sure the document snippet you posted matches your actual data?
> 
> Dave
> 
> 

-- 
View this message in context: 
http://old.nabble.com/XalanC1.10%3A-selectNodeList-does-not-retrieve-non-namespace-nodes-tp32536960p32622161.html
Sent from the Xalan - C - Users mailing list archive at Nabble.com.

Reply via email to