Parsing XML file with XSD

2010-06-01 Thread Chaitanya Yanamadala
Hai I have an XML file which i need to parse with the XSD file but it is not happening..if i do the same file with the PHP it is giving correct results.. so does any one know hw to do it.. This is the code i am using. use XML::SAX::ParserFactory; use XML::Validator::Schema; $validator = XML::Va

not able to get contents from hash after parsing xml

2010-04-19 Thread vyomesh Kulkarni
Have this xml file to parse and code written for the same is #!/usr/bin/perl use XML::Simple qw(:strict); use Data::Dumper; my $file = 'tc1.xml'; my $data = XMLin($file, ForceArray => 1, KeyAttr =>{},); #print Dumper($data); foreach my $TestCase (@{$data->{TestCase}}){ print $TestCase->{Actio

Re: Errors in parsing XML

2009-02-01 Thread Jenda Krynicky
From: Roman Makurin > Hi All > > Im using XML::RSS for parsing RSS feeds, it works fine for most feeds, > but sometimes it gives me following error: > > not well-formed (invalid token) at line 779, column 11, byte 83104 > at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/XML/Parser.pm

Re: Errors in parsing XML

2009-01-31 Thread Octavian Rasnita
- Original Message - > Hi All Im using XML::RSS for parsing RSS feeds, it works fine for most feeds, but sometimes it gives me following error: I use XML::FeedPP for parsing RSS and Atom feeds and it seems to work fine. Maybe it can help you... Octavian -- To unsubscribe, e-mail: be

Errors in parsing XML

2009-01-31 Thread Roman Makurin
Hi All Im using XML::RSS for parsing RSS feeds, it works fine for most feeds, but sometimes it gives me following error: not well-formed (invalid token) at line 779, column 11, byte 83104 at /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/XML/Parser.pm line 187 Firefox and other RSS a

Re: Parsing XML with HTML entities

2008-09-23 Thread Mr. Shawn H. Corey
On Tue, 2008-09-23 at 15:55 +0300, Vyacheslav Karamov wrote: > Hi All! > > I need to parse XML file which contain HTML entities like > > ø > > I'm using XML::Parser::Expat, but it stops processing when finds such > entity. > How could I handle this? > You need to add a DTD with those ent

Parsing XML with HTML entities

2008-09-23 Thread Vyacheslav Karamov
Hi All! I need to parse XML file which contain HTML entities like ø I'm using XML::Parser::Expat, but it stops processing when finds such entity. How could I handle this? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.or

Re: Parsing XML

2008-07-19 Thread epanda
Hi Rob, I only have to read values from nodes but I am amazing by what you say. But the XML file can take 10 Mb. I thought that expat was the faster parser because I have found this link http://www.xml.com/lpt/a/37. Maybe it was true in 1999 but it isn't not at all. You have to notice that the p

Re: Parsing XML

2008-07-19 Thread epanda
I would implement XML::LibXML or a better one, twig or Expat just to see if it is faster and then implement it in a C++ class. Have you got a sample of using Expat ? or Twig ? Are those lib available in C++ and twig or expat are faster than MSXML or Xerces ? Thanks On 19 juil, 13:15, [EMAIL PR

Re: Parsing XML

2008-07-19 Thread Dermot
2008/7/19 Amit Saxena <[EMAIL PROTECTED]>: > On Sat, Jul 19, 2008 at 6:44 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > >> >> Epanda wrote: >> > >> > Epanda wrote: >> >> >> >> I would like to know if we can parse XML with regexp faster than with >> >> an MSXML or Xerces library ? >> > >> > I just want

Re: Parsing XML

2008-07-19 Thread Amit Saxena
On Sat, Jul 19, 2008 at 6:44 AM, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Epanda wrote: > > > > Epanda wrote: > >> > >> I would like to know if we can parse XML with regexp faster than with > >> an MSXML or Xerces library ? > > > > I just want to parse an XML and I have seen that the XML!!Parser o

Re: Parsing XML

2008-07-18 Thread Rob Dixon
Epanda wrote: > > Epanda wrote: >> >> I would like to know if we can parse XML with regexp faster than with >> an MSXML or Xerces library ? > > I just want to parse an XML and I have seen that the XML!!Parser of > Perl based on Expat is the most faster ofth world, I don't know Twig. > > My XML

Re: Parsing XML

2008-07-18 Thread epanda
On 18 juil, 21:08, [EMAIL PROTECTED] (Epanda) wrote: > Hi, > > I would like to know if we can parse XML with regexp faster than with > an MSXML or Xerces library ? > > Thanks > Best Regards I just want to parse an XML and I have seen that the XML!!Parser of Perl based on Expat is the most faster

Re: Parsing XML

2008-07-18 Thread jeff pang
XML::Simple is fast enough. On Sat, Jul 19, 2008 at 3:08 AM, epanda <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know if we can parse XML with regexp faster than with > an MSXML or Xerces library ? > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: Parsing XML

2008-07-18 Thread Rob Dixon
epanda wrote: > > I would like to know if we can parse XML with regexp faster than with > an MSXML or Xerces library ? It is very unlikely to be faster using regular expressions, and it will certainly be less readable. The XML::Twig library can result in very fast code for some sorts of XML dat

Parsing XML

2008-07-18 Thread epanda
Hi, I would like to know if we can parse XML with regexp faster than with an MSXML or Xerces library ? Thanks Best Regards -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Parsing XML data

2007-05-21 Thread Mike Blezien
- Original Message - From: "David Moreno Garza" <[EMAIL PROTECTED]> To: Sent: Monday, May 21, 2007 8:23 PM Subject: Re: Parsing XML data Mike Blezien wrote: Hello, I am working with a XML gateway system which sends back response results in XML format. I have been

Re: Parsing XML data

2007-05-21 Thread David Moreno Garza
Mike Blezien wrote: > Hello, > > I am working with a XML gateway system which sends back response results in > XML format. I have been trying to work w/XML::Simple to parse the data, but > not too much success. This is a sample of the XML response data, the "*" > indicate the data we need to ex

Parsing XML data

2007-05-21 Thread Mike Blezien
Hello, I am working with a XML gateway system which sends back response results in XML format. I have been trying to work w/XML::Simple to parse the data, but not too much success. This is a sample of the XML response data, the "*" indicate the data we need to extract from XML file. I tried us

Re: parsing XML

2007-01-27 Thread Jenda Krynicky
From: Kevin Viel <[EMAIL PROTECTED]> > Jenda Krynicky kindly provided: > > > use XML::Rules; > > > > my $parser = XML::Rules->new( > > rules => [ > > Id => 'content', > > Item => sub {$_[1]->{Name} => $_[1]->{_content}}, > ># from the tags we are interested in the content > ># and

Re: parsing XML

2007-01-25 Thread Kevin Viel
From: Kevin Viel <[EMAIL PROTECTED]> I have obtain results of a query in XML format: http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd";> 4609 MYC v-myc myelocytomatosis viral oncogene homolog (avian) Homo sapiens 0 0

Re: parsing XML

2007-01-25 Thread Jenda Krynicky
From: Kevin Viel <[EMAIL PROTECTED]> > I have obtain results of a query in XML format: > > > October 2004//EN" > "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd";> > > 4609 > MYC > v-myc myelocytomatosis > > viral oncogene homolog (avian)

parsing XML

2007-01-24 Thread Kevin Viel
I have obtain results of a query in XML format: 2004//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_041029.dtd";> 4609 MYC v-myc myelocytomatosis viral oncogene homolog (avian) Homo sapiens 0 0 8 genomic 8

Re: First time Parsing XML

2005-04-02 Thread Todd W
"Gavin Henry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Saturday 02 Apr 2005 04:29, Johnstone, Colin wrote: > > Gidday All, > > > > I would like to use xml Parser to parse this chunk of xml (below) and > > return the business unit name and id attributes for each of the eleme

Re: First time Parsing XML

2005-04-02 Thread Gavin Henry
On Saturday 02 Apr 2005 04:29, Johnstone, Colin wrote: > Gidday All, > > I would like to use xml Parser to parse this chunk of xml (below) and > return the business unit name and id attributes for each of the elements > where division id = '221' > > I have tried Why not try: http://search.cpan.or

First time parsing XML

2005-04-01 Thread Johnstone, Colin
Gidday All, I would like to use xml Parser to parse this chunk of xml (below) and return the business unit name and id attributes for each of the elements where division id = '221' I have tried #!/web/Interwoven/TeamSite/iw-perl/bin/iwperl use XML::XPath; use XML::XPath::XMLParser; my $xpath;

First time Parsing XML

2005-04-01 Thread Johnstone, Colin
Gidday All, I would like to use xml Parser to parse this chunk of xml (below) and return the business unit name and id attributes for each of the elements where division id = '221' I have tried #!/web/Interwoven/TeamSite/iw-perl/bin/iwperl use XML::XPath; use XML::XPath::XMLParser; my $xpath;

Parsing XML

2003-01-27 Thread Nils-Anders Persson
Hello Perl-gurus, I have made a program that parses through a XML-document using the XML::DT. My problem is that I have to parse very big files > 2 Gb and the XML::DT is a bit slow. I split the file and process smaller chunks so that the memory usage doesn't go through the roof but it still takes

Re: AW: parsing xml files for variables

2002-06-04 Thread drieux
On Tuesday, June 4, 2002, at 07:46 , Theuerkorn Johannes wrote: > Thanks for support, found an easy to use mod in cpan: http://search.cpan. > org/search?mode=module&query=XML called XML-QL which seems to do just > what i need. always remember: "If It works for YOU it

AW: parsing xml files for variables

2002-06-04 Thread Theuerkorn Johannes
MTP:[EMAIL PROTECTED]] > Gesendet am: Dienstag, 4. Juni 2002 15:25 > An: Theuerkorn Johannes > Cc: cgi cgi-list > Betreff: Re: parsing xml files for variables > > > On Tuesday, June 4, 2002, at 05:12 , Theuerkorn Johannes wrote: > > >

RE: parsing XML code -> problem with HASH

2001-05-03 Thread Grant McLean
.web.co.nz| 20 Customhouse Quay Internet Solutions | Tel: +64 4 495 8250 | Box 1195, Wellington Awesome service| Fax: +64 4 495 8259 | New Zealand > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 02, 2001 10:58 PM > To

Re: parsing XML code -> problem with HASH

2001-05-02 Thread Me
I'm not sure what you are saying your problem is, and I may have this wrong, but since no one else has answered, I'll have a go. To generate a new, anonymous hash that is a copy of an existing named hash, use {}. Put the {} brackets around some expression that can be seen by perl as a hash, eg:

parsing XML code -> problem with HASH

2001-05-02 Thread Mika . P . Aho
Hi, I am having a small problem while parsing the XML code. First of all, here comes snip of the sourcecode: ... if ( $NN->[$j] eq "OBU" ) # if OBU was found... { $OBU = $NN->[$j+1]; for $e ( 0..@$OBU ) # loop through the content of OBU { if ( ref($OBU->[$e]) eq "HASH" ) { $