Guys, thanks for the help.
I found my problem. I was using the selectSingleNode() API instead of using the evaluate() API directly. Now that I'm using evaluate() everything works fine. Ori. ________________________________ From: Steve Hathaway [shath...@e-z.net] Sent: Wednesday, April 18, 2012 06:22 To: xalan-c-users@xml.apache.org Subject: Re: extracting element name using Xpath On 4/16/2012 11:30 AM, Ori Doolman wrote: Hi, I’m using xalan-1_11 and I’m trying to extract the XML element node *name* of a given XML. I searched the web and found several options – none are working with Xalan. Here is the XML I have: <?xml version="1.0" encoding="utf-8"?> <Envelope> <Body> <RetrieveWalletInformation> <Originator>string</Originator> <UserData> <UserID>1</UserID> <MVNOID>1</MVNOID> <LREId>1</LREId> <CountryCode>string</CountryCode> </UserData> <BodyData> <PortInReq>string</PortInReq> <MVNOID1>1</MVNOID1> </BodyData> </RetrieveWalletInformation> </Body> </Envelope> Here an expression I tried for extracting the node name ‘PortInReq’: local-name(/Envelope/Body/RetrieveWalletInformation/BodyData/*[1]) The expression evaluates well when testing in external website such as http://xpath.online-toolz.com/tools/xpath-editor.php The XPath expression 'name(/Envelope/Body/RetrieveWalletInformation/BodyData/*[1]' appears to work for me. Is 'local-name()' a valid XPath function for version 1.1? - Steve Am I doing something wrong or that it is not supported by Xalan? Regards, Ori. This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp