dear monks,
xml... how tedious. i am in desperate need of some, triks to parse nested structures such as this one:
<tradein_value>
<extra_clean/>
<clean>3225</clean>
<average>1975</average>
<rough>1025</rough>
</tradein_value>
-
<wholesale_value>
<extra_clean>0</extra_clean>
<clean>3150</clean>
<average>1900</average>
<rough>1050</rough>
</wholesale_value>
-
<retail_value>
<extra_clean>0</extra_clean>
<clean>5075</clean>
<average>3300</average>
<rough>2250</rough>
</retail_value>
using XML::Parser. or whatever might be better... without having to write thousands lines of code... typing is a struggle...
if someone may suggest a way, or refer me to some appropriate location, that describes such a way, or if
anyone had any ideas as to why the XML::Dumper::xml2pl might not be working for me, please tell me...
i'd be
et
er
na
ly grateful...
humbly
updates:
yes there are start and end tags, that was just a snipet which i didnt indicate..
the complete xml can be seen at
xml
i'd like to suck this into several mysql tables
an xml2mysql.pl if you will -- Thank you ~ vili
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.