Hi, I'm using Apache::AxKit::Language::XSP::TaglibHelper, trying to return
a data structure like this:

$VAR1 = {
          'row' => {
                     '20041122053512370' => {
                                              'bytes' => '9149',
                                              'status' => '200',
                                              'ip' => 'x.x.x.x'
                                            },
                     '20041122053512362' => {
                                              'bytes' => '9205',
                                              'status' => '200',
                                              'ip' => 'x.x.x.x'
                                            },
                   },
        }

This parses through XML::Simple into something like:

 <row id="20041122053512370">
   <bytes>9149</bytes>
   <status>200</status>
   <ip>x.x.x.x</ip>
 </row>
 <row id="20041122053512362">
   <bytes>9149</bytes>
   <status>200</status>
   <ip>x.x.x.x</ip>
 </row>

which is what I really want the output to be.  But this data structure
returns a "bad name at ...TaglibHelper.pm line 175." error in AxKit.

The ID fields are too big for perl to handle as array element keys
(greater than int) and TaglibHelper apparently won't recognize the string
as a row identifier.

Any ideas?

I changed my data structure to something like this:

$VAR1 = {
          'row' => [ {
                         'bytes' => '9149',
                         'status' => '200',
                         'ip' => 'x.x.x.x',
                         'id => '20041122053512370'
                     },
                     {
                         'bytes' => '9205',
                         'status' => '200',
                         'ip' => 'x.x.x.x',
                         'id => '20041122053512362'
                     } ]
        }

(making 'row' an array), and no more errors, but then I get lots of
<get-item id="1"> tags that I'm not too thrilled with, plus it seems icky.
 The :listitem=xx:rowitem=yy options to in the function definition seem to
have no effect, nor in combination with the array_uses_hash option (which
might not apply anyway).

Any thoughts on how I can structure my data so that I get the XML I'm
looking for?  Or is the answer to just use the as_xml option and have
XML::Simple do the work for me?


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

Reply via email to