Re: Problem with XMLin data structure.
- From: vamsee.2005@xxxxxxxxx
- Date: 15 Jan 2007 14:13:56 -0800
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.
.
- References:
- Problem with XMLin data structure.
- From: vamsee . 2005
- Re: Problem with XMLin data structure.
- From: John Bokma
- Problem with XMLin data structure.
- Prev by Date: Re: the => operator
- Next by Date: Re: Runs Fine In Perl :: Not As Cron Job
- Previous by thread: Re: Problem with XMLin data structure.
- Next by thread: the => operator
- Index(es):
Relevant Pages
|