Perl and XML Parsers


 
Thread Tools Search this Thread
Top Forums Programming Perl and XML Parsers
# 1  
Old 01-29-2013
Perl and XML Parsers

Hi,
Am pretty new for perl scripting and confused how to use XML Parser..
I just want to know how to use perl and XML parser..
The scenario is when i execute a command, it will generate a XML file..
From that XML file generated i need to grep for specific term that has HTML TAG say "title"..
Please help me to sort this..
I searched for sample programs in internet but even then I was unable to understand the concepts of XML Parser in Perl..
Smilie Smilie
# 2  
Old 01-29-2013
There are a large number of XML-parsing modules available for Perl; some actively maintained, some not maintained.

One of the better ones is XML::LibXML which you can find on CPAN. It is basically a wrapper around LibXML.
# 3  
Old 01-29-2013
XML parsing comes in two major flavors, DOM, where a tree in VM is built from the file, and SAX, where as the file is parsed, callbacks allow you to capture the elements opening and closing, their attributes and content. SAX is good for real time feeds and for large files, where the VM size might get prohibitive. Either one can run with or without vxd syntax checking, which throws exceptions when files violate rules.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Splitting xml file into several xml files using perl

Hi Everyone, I'm new here and I was checking this old post: /shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html (cannot paste link because of lack of points) I need to do something like this but understand very little of perl. I also check... (4 Replies)
Discussion started by: mcosta
4 Replies

2. Shell Programming and Scripting

How to get all the xml tags in perl?

Hi, I have 2 questions: a) Does getElementsByTagName in xml takes more time? b) If it takes more time what are the other alternatives used to get the tag names? For example: <Student> <Studname>aaa</Studname> <Studno>123</Studno> </Student> This is just a sample data. The file... (2 Replies)
Discussion started by: vanitham
2 Replies

3. Shell Programming and Scripting

How to improve the performance of parsers in Perl?

Hi, I have around one lakh records. I have used XML for the creation of the data. I have used these 2 Perl modules. use XML::DOM; use XML::LibXML; The data will loo like this and most it is textual entries. <eid>19000</eid> <einfo>This is the ..........</einfo> ......... (3 Replies)
Discussion started by: vanitham
3 Replies

4. Programming

XML Handling in Perl

Hi there, I'm newby in perl and XML. I can read and parse Xml with XML-Node upper XML::Parser, but how can I create XML tags and pack my individual data in it then send through socket. PLZ lead me :) Thanks in Advance. (1 Reply)
Discussion started by: Zaxon
1 Replies

5. Shell Programming and Scripting

Perl + xml

Hi there, I have need create and read (Handle) XML in perl, a lib with oop support. are you can present suitable library for this? Thanks in advance. (1 Reply)
Discussion started by: Zaxon
1 Replies

6. Shell Programming and Scripting

XML file using Perl

Hi All, Does anyone know how to generate an XML file using perl scripting? Thanks in advance. Regards, P AGARWAL (3 Replies)
Discussion started by: agarwal
3 Replies

7. Shell Programming and Scripting

Perl XML:Parser help

I am very new to XML. Really I have an excel file that I am trying to read w/ Perl on a Linux machine. I don't have a mod for reading excel files so I have to convert the excel file to xml to be able to read it. I can read the file and everything is ok except...the Number style is being dropped... (0 Replies)
Discussion started by: vincaStar
0 Replies

8. Shell Programming and Scripting

xml parser in perl

hi all i want to read xml file in perl i am using XML::Simple for this. i am not getting how to read following file removing xml file due to some reason (1 Reply)
Discussion started by: zedex
1 Replies

9. Shell Programming and Scripting

How to parse a XML file using PERL and XML::DOm

I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Discussion started by: girigopal
0 Replies

10. UNIX for Advanced & Expert Users

XML parsers for UNIX

Hi, I'm looking for XML parsers for UNIX! Thanks in advance Tim (1 Reply)
Discussion started by: timvant
1 Replies
Login or Register to Ask a Question