Your syntax looks like it will work. Yes, the documentation is scant.
I made a document, to aid on this kinda stuff, go to http://
www.bighead.net/tools and download the pdf called:
Fast, Efficient Witango 5.5 XML WebServices
Then look at page 3, here is a snippet:
What we want, is an array with of ImageCategories, with one column
per child node, and multiple rows. Looping is VERY slow if the root
of the dom has a lot of child nodes. So after a
bunch of tests and tweaks, we wrote a method that gets a dom like
this into an array, without looping, and easy to move from one taf to
another.
Here is the snippet, it can easily be put into a tcf method or custom
tag with the name of the xpath and the dom as a parameter.
<@assign local$xml <@dom "<@var local$inxml>">>
<@assign local$xpath "//ImageCategory">
<@assign local$names <@elementname local$xml xpath="<@var local$xpath>
[1]/*" type=array>>
<@rows array=local$names>
<@if "<@currow> = 1">
<@assign local$temp <@elementvalue local$xml xpath="<@var local
$xpath>/<@col 1>" type=array>>
<@define local$out type=array cols=<@numrows array=local$names>
rows=<@numrows array=local$temp>>
<@assign local$out[*,1] <@var local$temp>>
<@assign local$temp "">
<@else>
<@assign local$out[*,<@currow>] <@elementvalue local$xml xpath="<@var
local$xpath>/<@col 1>" type=array>>
</@if>
<@assign local$out[0,<@currow>] "<@col 1>"></@rows>
--
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
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/
On May 14, 2007, at 10:03 AM, Dan Stein wrote:
I have to re-write my Rate parser since USPSD changed not just the
rates but the service names etc today.
So I do not get burned like this again I wanted to change the XPath
I use and only get back the rates my client wants anyway.
Since the send the service ID attribute anyway this should be easy
but I get the syntax right for Witango it works fine in my XML
editor as an XPATH query but not in Witango
The XML file is attached
Right at this point I would love to get just my client requested
rates back
<@ASSIGN request$usps_result value="<@DOM value='@@fromUSPS'>">
I wanted to use syntax like this
<@ELEMENTVALUE object=request$usps_result XPath=//[EMAIL PROTECTED] or
@ID=3] type=array>
I want to use the XPATH in order to limit the @DOM Value so it only
holds the Service elements that I am interested in. Then I can just
walk the path and build my array.
The documentation is sparse on this.
I could use help.
Of course this all happened without warning this morning so we
can’t take foreign orders till I get this fixed.
______________________________________________________________________
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
<usps.xml>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf