Looking for a VERY EFFICIENT module for XML

I

Ignoramus17503

Right now I use XML::Simple. As it turns out, this module is
relatively slow to parse big XML texts.

Is there another perl module, I need something very fast.

That's for my Net::eBay module.

Thanks

i
 
R

robic0

Right now I use XML::Simple. As it turns out, this module is
relatively slow to parse big XML texts.

Is there another perl module, I need something very fast.

That's for my Net::eBay module.

Thanks

i

Use RXParse.pm (posted in this ng) by robic0!
 
J

J. Gleixner

Ignoramus17503 said:
Right now I use XML::Simple. As it turns out, this module is
relatively slow to parse big XML texts.

Is there another perl module, I need something very fast.

Start with the FAQ, which is listed in XML::Simple's documentation:
http://perl-xml.source-forge.net/faq/

Also, you can use a search engine, on your own time, to help you find
answers to these types of questions.
 
R

robic0

use v.91 only.....


Hey wait, xml simple doesent parse xml!!!
Simple uses one of a few seperate parse module's availabe
to congeil data into a hash.
Don't you know Perl?
 
X

xhoster

Ignoramus17503 said:
Right now I use XML::Simple. As it turns out, this module is
relatively slow to parse big XML texts.

XML::Simple just uses some other module to do the actual parsing.
What part is slow, the actual parsing, or the XML::Simple part of
the code? Have you profiled it to see? You might be using
XML::SAX::purePerl behind the scenes, which is going to be slow.

Xho
 
R

robic0

XML::Simple just uses some other module to do the actual parsing.
What part is slow, the actual parsing, or the XML::Simple part of
the code? Have you profiled it to see? You might be using
XML::SAX::purePerl behind the scenes, which is going to be slow.

Xho

When I get done with RXParse (that I have to rename cause of some SAS
impingement namage) your all going to be using it. The big module parsers
won't (can't) change quickly. Mine is interactive and quick as lightning.
It will be the defacto developer/user parser of choice. Period!

robic0
(god of porn)
 
I

Ignoramus17503

XML::Simple just uses some other module to do the actual parsing.
What part is slow, the actual parsing, or the XML::Simple part of
the code? Have you profiled it to see? You might be using
XML::SAX::purePerl behind the scenes, which is going to be slow.

Well, what I want is to convert XML into perl structures, out of which
I would then get data.

Yes, I profiled it, XML::Simple takes most of the time.

I am looking for some simple alternatives, it is killing me.

i
 
J

John Bokma

Ignoramus17503 said:
Right now I use XML::Simple. As it turns out, this module is
relatively slow to parse big XML texts.

Is there another perl module, I need something very fast.

That's for my Net::eBay module.

XML::parser? It depends a lot on what you're doing and what you actually
want to happen. How big is big?


BTW: You can drop me a line, I might be able to help out.
 
R

robic0

Well, what I want is to convert XML into perl structures, out of which
I would then get data.

Yes, I profiled it, XML::Simple takes most of the time.

I am looking for some simple alternatives, it is killing me.

i
Well, your certainly not responding to me. So my reply is to the others
who try to help you here. The pro's are directed to you though.

First and last, your one dumb mother fucking retard asshole !!!!!!!!!

Second, to get data into hashes, Simple is about it for Perl.

If given a variable xml document, you can't predict where a particular
layer of data will be. Therefore you can't just hand the entire xml document
to Simple, you just fuckin can't !!!!!!!!!

You have to pick the know layer that you want from the document. The known
layer is the one that has known output that you can address in the code.

You are one dumb sonofabitch!!!!!!

robic0
(god of porn)
 
R

robic0

I wonder why we're not all flocking to your module. Why could it be?
Surely it's not the personal and professional support.

From the RXParse tech support group:
Hey, I don't give a rats ass if you live or die!!!!!!

RXParse support group
 
R

robic0

From the RXParse tech support group:
Hey, I don't give a rats ass if you live or die!!!!!!

RXParse support group

Ok, sorry Glenn, that poster used my logon and I just
fired him. That vulgarity is not, and will not be tollerated
within the RXParse group.

My apoligies.

Sincerly,
CEO/President RoParse Technoligies.

R. Cps
 
X

xhoster

Ignoramus17503 said:
Well, what I want is to convert XML into perl structures, out of which
I would then get data.

Yes, I profiled it, XML::Simple takes most of the time.

I am looking for some simple alternatives, it is killing me.

Could you post the dprofpp output, or something that generates realistic
XML for us to benchmark ourselves?


Xho
 
I

Ignoramus24559

Could you post the dprofpp output, or something that generates realistic
XML for us to benchmark ourselves?

Good question, but I already switched to XML::Twig, and everything is
just fine after that.

i
 
X

xhoster

Ignoramus24559 said:
Good question, but I already switched to XML::Twig, and everything is
just fine after that.

I'm glad you found a solution, but it is hard to believe that XML::Twig is
faster than XML::Simple *if* you are using Twig to load the entire document.
I generally find XML::Simple faster than XML::Twig for that, and easier to
use to boot.

(Unless, of course, XML::Simple is falling back on XML::SAX::purePerl).


time perl -le 'use XML::Simple; $XML::Simple::pREFERRED_PARSER=""; \
use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
8.445u 0.084s 0:08.59 99.1% 0+0k 0+0io 0pf+0w

time perl -le 'use XML::Simple;\
$XML::Simple::pREFERRED_PARSER="XML::parser";\
use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
6.443u 0.055s 0:06.60 98.3% 0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Simple; \
$XML::Simple::pREFERRED_PARSER="XML::SAX::purePerl"; use Data::Dumper;\
XMLin("test.xml") foreach 1..300' > /dev/null
61.260u 0.100s 1:01.49 99.7% 0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Twig; use Data::Dumper; \
do {my $x = XML::Twig->new(); $x->parsefile("test3.xml")} \
foreach 1..300' > /dev/null
8.942u 0.046s 0:09.08 98.8% 0+0k 0+0io 0pf+0w




Xho
 
I

Ignoramus24559

I'm glad you found a solution, but it is hard to believe that XML::Twig is
faster than XML::Simple *if* you are using Twig to load the entire document.

I am doing just that.
I generally find XML::Simple faster than XML::Twig for that, and easier to
use to boot.

I also find XML::Simple easier to use. It is, simply put, a great
module! And, possibly, I overlooked something that made it seem slow.
(Unless, of course, XML::Simple is falling back on XML::SAX::purePerl).

I have no idea what mine used. I will check at some point.
time perl -le 'use XML::Simple; $XML::Simple::pREFERRED_PARSER=""; \
use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
8.445u 0.084s 0:08.59 99.1% 0+0k 0+0io 0pf+0w

time perl -le 'use XML::Simple;\
$XML::Simple::pREFERRED_PARSER="XML::parser";\
use Data::Dumper; XMLin("test.xml") foreach 1..300' > /dev/null
6.443u 0.055s 0:06.60 98.3% 0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Simple; \
$XML::Simple::pREFERRED_PARSER="XML::SAX::purePerl"; use Data::Dumper;\
XMLin("test.xml") foreach 1..300' > /dev/null
61.260u 0.100s 1:01.49 99.7% 0+0k 0+0io 0pf+0w

subspace/perl_misc> time perl -le 'use XML::Twig; use Data::Dumper; \
do {my $x = XML::Twig->new(); $x->parsefile("test3.xml")} \
foreach 1..300' > /dev/null
8.942u 0.046s 0:09.08 98.8% 0+0k 0+0io 0pf+0w

Your stats are very impressive. Maybe it is indeed a PurePerl issue.

I kept the old code, actually, I switch between old and new code with
an if statement. if( 0 ) etc.

So, when I have some time, I will check what preferred parser I use
for XML::Simple (it seems, from looking at its source code, that it is
set to undef by default), and maybe I can change that, because I like
XML::Simple a lot better.

You seem to actually know what you are talking about, which is
fantastic.

i
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top