Hi Stephanie:

The code was not designed to retrieve all the nodes, just the first node
while using as="string". But of course this can change.

How we can separate every node in the returned string? Or we don't need a
separation char at all?

Please comments.

Best Regards,

Antonio Gallardo


Stephanie Zohner dijo:
> Hi,
>
> This is a bug, in my opinion. I already posted it in the dev mailing list
> (but haven't got an answer yet).
>
> Here's my work around: Think of "role", instead of "name"
> <xsp:logic>
> org.w3c.dom.DocumentFragment fragment = <xsp-session-fw:getxml as="object"
> context="authentication" path="/authentication/data/name"/>
> StringBuffer name = new StringBuffer();
> for(int i = 0; i&lt; fragment.getChildNodes().getLength(); i++){
> name.append(fragment.getChildNodes().item(i).getNodeValue());
> }
> </xsp:logic>
>
> Now the whole string is saved in the variable "name", you can use now for
> your purpose.
>
> Hope that helped,
>
> Good luck,
>
> Stephanie
>
>
>> Hi,
>>
>> I'm using the Authentication framework and was trying to retrieve the
>> 'role' of a user by using the session. (just using the sitemap parameter
>> {role} works fine)
>> In an XSP I used the following line:
>>
>> String role = <xsp-session-fw:getxml  context="authentication"
>> path="/authentication/role" as="string"/>;
>>
>> I expected to get the full value of 'role', but got only a part of it.
>> Apparently that line does not get every text node from the role element,
>> but just the first one.
>> (If I retreive it as a documentfragment, all is fine but I do want it as
>> a string and don't want to parse the node itself!)
>>
>> Is this a bug?? If not, what is the meaning of the 'as="string"'??
>>
>> Greetings,
>>
>> Jan
>
> --
> +++ GMX - die erste Adresse f�r Mail, Message, More +++
> Bis 31.1.: TopMail + Digicam f�r nur 29 EUR http://www.gmx.net/topmail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to