Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML::Dumper

Status
Not open for further replies.

afx

Programmer
Mar 4, 2004
27
CA
I am trying to use XML::Dumper to dump a complex variable structure to a file and read it back in.

I can generate the XML file but I'm having problems reading it back in.

I can't get the doc examples to work either. I've got the latest XML::Dumper and XML::parser - any ideas? anyone? please?

regards
Mark H., AFX
 
Can you please give us some short code snippets (working examples please (of the XML generation and your attempts at parsing said XML)), and if you are getting errors, can you pop those up for us to see too?

--jim
 
Many thanks for your interest in helping me. In the end my test file worked but only after I had dereferenced the $variable that was the result of the $dump->xml2pl($xml_data_read_from_file).

i.e.
$ref = $dump->xml2pl(($xml_data_read_from_file)
@info = @$ref;

The strangest thing was that there were several docs on the net that said that the CPAN example was missing a few steps: parsing the xml data to create a tree and it was the tree that should be passed to xml2pl. However, when I did that I had many more problems. So I went back to basics and it worked (after the deref)!

I will now port my test functions to my main application and see if it still works there!
Thanks again.

regards
Mark H., AFX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top