Re: Problem with XMLin data structure.




John Bokma wrote:
vamsee.2005@xxxxxxxxx wrote:

<response status="sucess">
<value type="hash">
<item key="asdfas" value="hello"/>
<item key="adfa" value="hi"/>
</value>
</response>

XMLin is producing following below data structure from the above xml.

[..]

What to do inorder to XMLin to force create the below datastructure.

Name the module you use instead of a method of this module. Not everybody
is aware that it's part of XML::Simple.

As for your question, did you ever read the documentation of the module
you're using? I guess not, or not well enough. You probably copied the
example and thought that it was all.

Search for "folding" in the documentation of XML::Simple.


--
John Experienced Perl programmer: http://castleamber.com/

Perl help, tutorials, and examples: http://johnbokma.com/perl/


Thanks for your reply, I didn't copied it, I am new to perl. I am
working on a php based web services kinda like RPC, Where as at client
side I am using perl script with AUTOLOADER, which will emulate missing
methods and post that info in the form of xml to php web service and
get the returned value in the form of xml and parse it and return it in
desired data structure to the calling sub routine.

I also have xml snippet
<response status="success">
<value type="array">
<item value="hello"/>
<item value="hi hi"/>
</value>
</response>

for this XMLin in XML::Simple giving the following data structure
$VAR1 = {
'value' => {
'item' => [
{
'value' => 'hello'
},
{
'value' => 'hi hi'
}
],
'type' => 'array'
},
'status' => 'sucess'
};
So I was curious about the differences, Now i know the problem, thanks
for replying.

.



Relevant Pages

  • Re: Latest version of glossary
    ... such as XML, refer to the use of the term within that "namespace" using ... An n-dimensional data structure, S, is one where each element of S ... Whenever mathematics is applied to anything, ... associative array (while trying to do something in JavaScript, ...
    (comp.databases.theory)
  • Re: Problem with XMLin data structure.
    ... XMLin is producing following below data structure from the above xml. ...
    (comp.lang.perl.misc)
  • Re: Is there any use for XML in VB (or anywhere else) ?
    ... an ADO recordset. ... It really depends on the data structure that you are trying to ... I just prefer the flexibility of the XML ... Linux web servers. ...
    (microsoft.public.vb.general.discussion)
  • Re: Hash of hashes, of hashes, of arrays of hashes
    ... >>> I'm trying to create a data structure that will make it ... >>> easier to create a series of slightly different XML documents. ... >> string for that inner block, ... >a child that has no arrays. ...
    (comp.lang.perl.misc)
  • integrating C++ apps with perl
    ... I've never used perl before, and I have a gut feeling that it might be ... data structure consists of strings and numbers, ... user an opportunity to transform each data structure into anything they ... like XML, but it could just as easily be entirely binary (even the XML ...
    (perl.beginners)