The xml was a little messy. I cleaned it up. This is what I was able to verify as well-formed:
<?xml version="1.0" encoding="utf-8"?>
<file Catid="0011" Date_added="20050910000000" HighPic="photo/location
+.jpg" HighPicHeight="123" HighPicSize="1122" HighPicWidth="123" Model
+="varchar model name" On_Market="0" Prod_ID="varchar id name" Product
+_I="111" Product_View="11223" Quality="qualitylevel" Supplier="x" Upd
+ated="20110713144032" path="required/path/to/other.doc"></file>
The code that I used to read it:
#!/usr/bin/perl
use strict;
use Data::Dumper;
use XML::Simple qw(:strict);
my $xs = XML::Simple->new();
my $xml = $xs->XMLin('/root/Desktop/914477.xml',
ForceArray => 1,
KeyAttr => 1);
binmode STDOUT, ':encoding(utf8)';
print Dumper($xml);
Is that what you were thinking of?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.