Re: How do you parse XML?
by toolic (Bishop) on Dec 01, 2013 at 23:35 UTC
|
my @tokens = 'XML' =~ /(.)/g;
| [reply] [d/l] |
Re: How do you parse XML?
by Discipulus (Canon) on Dec 02, 2013 at 08:50 UTC
|
| [reply] [d/l] |
|
| [reply] |
|
| [reply] [d/l] |
Re: How do you parse XML?
by DrHyde (Prior) on Dec 02, 2013 at 10:49 UTC
|
| [reply] |
Re: How do you parse XML?
by KevinZwack (Chaplain) on Dec 03, 2013 at 16:43 UTC
|
| [reply] |
|
| [reply] |
|
+1 -- because the existing use of XML::Simple was failing to catch invalid files and it was slower
| [reply] |
Re: How do you parse XML?
by blue_cowdawg (Monsignor) on Dec 04, 2013 at 14:16 UTC
|
How do I parse XML? Not at all, I write a Perl script to do that. :-)
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
| [reply] |
Re: How do you parse XML?
by lidden (Curate) on Dec 02, 2013 at 02:34 UTC
|
Some other way -> Not at all.
I guess i could have gone with "what is XML" but I know what it is I just have no reason to deal with it. | [reply] |
Re: How do you parse XML?
by agentorange (Sexton) on Dec 02, 2013 at 10:27 UTC
|
| [reply] |
Re: How do you parse XML?
by smls (Friar) on Dec 04, 2013 at 12:10 UTC
|
| [reply] |
Re: How do you parse XML?
by Ralesk (Pilgrim) on Dec 06, 2013 at 12:57 UTC
|
I went with the ‘forbidden’ vote.
XML is a horrible mess and we don’t use (parse, generate) it unless it’s absolutely required (by… uh… Java people for example, who seem to be obsessed with this overcomplicated and ambiguous, yet still particularly limited, format for data exchange).
| [reply] |
Re: How do you parse XML?
by Grimy (Pilgrim) on Dec 06, 2013 at 08:31 UTC
|
I don't parse XML. I let Chromium do the parsing, then fiddle with the resulting tree using JS/jQuery (yes, this works for arbitrary XML, not just XHTML). | [reply] |
Re: How do you parse XML?
by jellisii2 (Hermit) on Dec 26, 2013 at 15:22 UTC
|
No mention of XML::Twig?! Let me rectify this right now: Of all the options I played with when I first had to start parsing XML, XML::Twig was the easiest for me to understand and get up to speed with. I've not found any case where it couldn't do the job I needed when dealing with XML. May $DEITY bless mirod.
--edit: clarity. Need more coffee.
| [reply] |
|
++ to XML::Twig; I was also surprised to find XML::Simple as the only Perl module listed in the poll. I've been using XML::Twig ever since some more experienced monks (Your Mother, toolic) guided me in this area, and it's not let me down. It also comes with the very handy xml_grep and xml_pp (pretty-printer), which find frequent use at work.
I'm one of those "Java people" and I regularly deal with XML. I don't understand all the hate for it; after all, the very content you're reading right now was delivered to your computer using a form of XML. Right tool in the right place and all that.
| [reply] [d/l] [select] |
|
The list of options presented turned the poll into a silly joke.
HTML is not a form of XML! It's similar, but one ain't a form of the other.
I think most of the hate comes from the tendency of a lot of (especially) companies, that go absolutely bollocks when designing their XML formats producing thus insane, overcomplicated, hard to use messes. An from some people's insistence on using XML everywhere for everything. SOAP or HR-XML can turn anyone to a XML-hater.
Jenda
Enoch was right!
Enjoy the last years of Rome.
| [reply] |
Re: How do you parse XML?
by vitoco (Friar) on Dec 04, 2013 at 15:33 UTC
|
I never parse the XML as a whole... I usually search for some data between some tags in a given context using regular expression over a slurped string.
| [reply] |
Re: How do you parse XML?
by jesuashok (Curate) on Dec 04, 2013 at 03:25 UTC
|
| [reply] |
Re: How do you parse XML?
by cavac (Vicar) on Dec 18, 2013 at 13:29 UTC
|
| [reply] |
Re: How do you parse XML?
by Anonymous Monk on Dec 10, 2013 at 01:24 UTC
|
Depends on the XML file to parse, would used XML::Simple or XML::Twig. | [reply] |
Re: How do you parse XML?
by chacham (Prior) on May 15, 2017 at 20:25 UTC
|
Missing option: Use an RDBMS.
XMLDB or its equivalent is available on many RDBMS's. So, if available, it's a really good option to get what you want from it without the hassle.
| [reply] |