There are a few ways to do it, but using translate, to make the name of the node, all uppercase, works for me. You can use this technique in many ways.

<@assign local$thedom "<doc>
    <Identity>myidentity</Indentity>
</doc>">

<@assign local$mynode <@elementvalue local$thedom xpath="/doc/identity">>
the above doesn't work, but to make it case insensitive...

<@assign local$nametofind "identity">
<@assign local$mynode <@elementvalue local$thedom xpath="/doc/[translate(name(),'<@var local$nametofind format=case:lower>','<@var local$nametofind format=case:upper>')='<@var local$nametofind format=case:upper>']">>

Notes:

Function: translate (STRING, STRING, STRING)

    The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example,

     translate("bar","abc","ABC") returns the string BAr. 

    If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example,

     translate("--aaa--","abc-","ABC") returns "AAA". 

    If a character occurs more than once in the second argument string, then the first occurrence determines the replacement character. If the third argument string is longer than the second argument string, then excess characters are ignored.

    NOTE: The translate function is not a sufficient solution for case conversion in all languages. A future version may provide additional functions for case conversion.

    This function was implemented using tr///d.


-- 

Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040

On Aug 28, 2006, at 8:13 PM, [EMAIL PROTECTED] wrote:

to late :-) I have change everything.
But pls. post the snippet.

thx

Daniel

----- Original Message ----- From: "Robert Garcia" <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2006 4:00 AM
Subject: Re: Witango-Talk: XML to array?


You can use xpath, in a NON-case sensitive way. I can find a snippet  if youi need it, don't have on top of my head, I posted it before.
-- 
Robert Garcia
President - BigHead Technology
VP Application Development - eventpix.com
13653 West Park Dr
Magalia, Ca 95954
ph: 530.645.4040 x222 fax: 530.645.4040
On Aug 28, 2006, at 6:56 PM, [EMAIL PROTECTED] wrote:
just a hint: Since 5.5 XML declarations are casesensitiv.
ie: Witango is not witango

rs

Daniel
----- Original Message ----- From: "Scott Cadillac"  <[EMAIL PROTECTED]>
Sent: Tuesday, August 29, 2006 3:49 AM
Subject: RE: Witango-Talk: XML to array?


Hi Robert and Dan,

With 5.0, if I remember right, you have to loop
through the dom.

Yep and do the child thing

I've rarely found this to be the case. But it does depends on the  design of the XML.

Scott Cadillac,



______________________________________________________________________ __

______________________________________________________________________ __
________________________________________________________________________

________________________________________________________________________

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to