Re: XML::Feed.pm perl on CentOS 7

2019-09-03 Thread Shlomi Fish
Hi Lars, On Tue, 3 Sep 2019 08:06:36 +0300 Lars Noodén wrote: > I'm not finding CPAN's XML::Feed.pm for perl 5 for centos 7 via yum. > > $ yum -q search all XML-Feed > Warning: No matches found for: XML-Feed > > $ grep PRETTY /etc/os-release > PRETTY_NAME="

XML::Feed.pm perl on CentOS 7

2019-09-02 Thread Lars Noodén
I'm not finding CPAN's XML::Feed.pm for perl 5 for centos 7 via yum. $ yum -q search all XML-Feed Warning: No matches found for: XML-Feed $ grep PRETTY /etc/os-release PRETTY_NAME="CentOS Linux 7 (Core)" Is there an additional package repository containing CPAN material for

Re: Making use of XML::Feed->parse() more robust

2019-08-29 Thread Andy Bach
> Is this something which should be handled differently in the module itself? Possibly. But what the author considers to be fatal is up to them so I wouldn’t say “should” but “could” ... that’s why Perl has eval ;-). You can go into the module code, find the “die” and change it “warn” maybe. It’d

Re: Making use of XML::Feed->parse() more robust

2019-08-29 Thread Lars Noodén
On 8/28/19 7:33 PM, Andy Bach wrote: > Look at eval blocks - lets you trap fatal errors from other code and not > die/abort yourself. > https://perldoc.perl.org/functions/eval.html Thanks. I went with an eval block since it was very quick to set up. > You can also wrie your own signal handling c

Re: Making use of XML::Feed->parse() more robust

2019-08-28 Thread Andy Bach
Lars Noodén wrote: > I've been using the CPAN module XML::Feed to parse Atom and RSS feeds. > Some of the feeds it fetches are a little broken from time to time and > when that happens the parser produces and error and stops the program. > I'd like it to just keep going.

Making use of XML::Feed->parse() more robust

2019-08-28 Thread Lars Noodén
I've been using the CPAN module XML::Feed to parse Atom and RSS feeds. Some of the feeds it fetches are a little broken from time to time and when that happens the parser produces and error and stops the program. I'd like it to just keep going. I am invoking the parser inside a subro

RE: XML::LibXML and comments

2018-09-11 Thread John Cortland Morgan
Hi Lawrence, Works great, thanks! Never thought of appending the comment directly to the $doc, just assumed I Needed to set the root first. Regards, John From: Lawrence Statton Sent: Monday, September 10, 2018 9:44 PM To: beginners@perl.org Subject: Re: XML::LibXML and comments On Sep

Re: XML::LibXML and comments

2018-09-10 Thread Lawrence Statton
> On Sep 10, 2018, at 6:33 AM, John Cortland Morgan > wrote: > > Hi, > > I'm trying to place a comment directly after the XML declaration using > XML::LibXML, > But cannot seem to manage, always receiving error: > > setDocumentElement: ELEMENT node

Re: XML::LibXML and comments

2018-09-10 Thread Andy Bach
Take a look at: https://stackoverflow.com/questions/19411152/libxml-inserting-a-comment use XML::LibXML; my $doc = XML::LibXML::Document->new;my $root = $doc->createElement("doc"); $doc->setDocumentElement($root); $root->appendChild($doc->createElement("

XML::LibXML and comments

2018-09-10 Thread John Cortland Morgan
Hi, I'm trying to place a comment directly after the XML declaration using XML::LibXML, But cannot seem to manage, always receiving error: setDocumentElement: ELEMENT node required at .../LibXML.pm line 1393 What I would like: testing My relevant code thus far: My $dom

Re: Using __DATA__ with XML::LibXML

2017-06-23 Thread khalil zakaria Zemmoura
; I think I'm losing it. I'm trying to do something simple here but > I can't get it to work. > > I'm using XML::LibXML to verify XML sitemaps and it's working fine > with an external XSD file. However, I'd like to add the schema to a &g

Using __DATA__ with XML::LibXML

2017-06-22 Thread SSC_perl
I think I'm losing it. I'm trying to do something simple here but I can't get it to work. I'm using XML::LibXML to verify XML sitemaps and it's working fine with an external XSD file. However, I'd like to add the schema to a __DATA__ section so

Re: XML::Simple Umlaute

2016-08-09 Thread Chas. Owens
Take a look at the -C argument for perl and the PERL_UNICODE environment variable in http://perldoc.perl.org/perlrun.html Examine the difference between perl -E 'say "\x{df}"' and PERL_UNICODE=O perl -E 'say "\x{df}"' That said, if you are working with the web, why in the world are you sending

Re: XML::Simple Umlaute

2016-08-09 Thread hw
Chas. Owens schrieb: On Thu, Jul 28, 2016 at 10:05 AM, hw wrote: snip So which character encoding on STDOUT does perl use by default? That should be utf-8 without any further ado, shouldn´t it? When I add binmode STDOUT, ":encoding(utf-8)"; the characters are displayed correctly in the te

Re: XML::Simple Umlaute

2016-08-09 Thread hw
Chas. Owens schrieb: On Thu, Jul 28, 2016 at 10:55 AM Paul Johnson mailto:p...@pjcj.net>> wrote: On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote: snip > Also, this answer on StackOverflow by tchrist (Tom Christiansen, who I > would say knows the most about the inters

Re: XML::Simple Umlaute

2016-08-09 Thread hw
Paul Johnson schrieb: On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote: On Thu, Jul 28, 2016 at 10:05 AM, hw wrote: snip So which character encoding on STDOUT does perl use by default? That should be utf-8 without any further ado, shouldn´t it? When I add binmode STDOUT, ":encod

Re: XML::Simple Umlaute

2016-07-30 Thread Mike Flannigan
I'm not sure if it is possible to use Umlaute in XML Files or not. Maybe this post with help you: http://stackoverflow.com/questions/11772468/reading-xml-files-with-umlaut-chars Is there a way to change encoding to "iso-8859-1"? Mike On 7/28/2016 8:03 AM, beginners-diges

Re: XML::Simple Umlaute

2016-07-28 Thread Chas. Owens
On Thu, Jul 28, 2016 at 10:55 AM Paul Johnson wrote: > On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote: snip > > Also, this answer on StackOverflow by tchrist (Tom Christiansen, who I > > would say knows the most about the intersection of Perl and Unicode) > > is a good resource: h

Re: XML::Simple Umlaute

2016-07-28 Thread Paul Johnson
On Thu, Jul 28, 2016 at 10:23:19AM -0400, Chas. Owens wrote: > On Thu, Jul 28, 2016 at 10:05 AM, hw wrote: > snip > > So which character encoding on STDOUT does perl use by default? That should > > be utf-8 without any further ado, shouldn´t it? When I add > > > > > > binmode STDOUT, ":encoding(

Re: XML::Simple Umlaute

2016-07-28 Thread Chas. Owens
On Thu, Jul 28, 2016 at 10:05 AM, hw wrote: snip > So which character encoding on STDOUT does perl use by default? That should > be utf-8 without any further ado, shouldn´t it? When I add > > > binmode STDOUT, ":encoding(utf-8)"; > > > the characters are displayed correctly in the terminal. Why

Re: XML::Simple Umlaute

2016-07-28 Thread hw
feature 'say'; use utf8; use XML::Simple; use Data::Dumper; my $xml = new XML::Simple; my $data = $xml->XMLin("test.xml"); open my $fh, ">", 'pout'; binmode $fh, ":encoding(utf-8)"; print $fh Dumper($data); print Dumper($data); print $fh

Re: XML::Simple Umlaute

2016-07-28 Thread Chas. Owens
Data::Dumper is dumping the internal format. To ensure compatibility, it is using the \x{df} escape to represent LATIN SMALL LETTER SHARP S. To see it rendered as a character, just print it: #!/usr/bin/perl use strict; use feature 'say'; use XML::Simple; #warnings should come last

XML::Simple Umlaute

2016-07-28 Thread hw
Hi, I would like to read XML files which look like this: uuid:ee1bd852-37ee-4965-a097-50130cf6dac7 Infostand 5449000134264 groß 5449000134264 5449000134264 10.0 20 There is an Umlaut, ß, supposed to be at groß

Re: XML Simple + parsing inner loop elements + help

2015-12-08 Thread perl kamal
Hi, Thanks you for your valuable comments,let me try the Twig module. On 12/8/15, Kent Fredric wrote: > On 8 December 2015 at 19:25, perl kamal wrote: >> I am trying to parse the inner loop elements of the attached input xml >> elements. >> The below code doesn'

Re: XML Simple + parsing inner loop elements + help

2015-12-08 Thread shawn wilson
tl;dr I'm not answering your specific question here. On Dec 8, 2015 1:26 AM, "perl kamal" wrote: > > Hi, > > I am trying to parse the inner loop elements of the attached input xml elements. Just fyi, I've found it easier to use xslt as an etl preprocessor to perl

Re: XML Simple + parsing inner loop elements + help

2015-12-08 Thread Kent Fredric
On 8 December 2015 at 19:25, perl kamal wrote: > I am trying to parse the inner loop elements of the attached input xml > elements. > The below code doesn't retrieve the inner loop() elements if > the properties tag contains more than one item. Will you please point > the

XML Simple + parsing inner loop elements + help

2015-12-07 Thread perl kamal
Hi, I am trying to parse the inner loop elements of the attached input xml elements. The below code doesn't retrieve the inner loop() elements if the properties tag contains more than one item. Will you please point the error and correct me. Please find the attached input xml file. Thanks.

XML Sructure creation not working

2015-11-20 Thread Punit Jain
Hi, I am facing an issue with my script while creating a XML . Below is required structure :- xyz true Distri 123 However I am getting below o/p xyz true Distri 123 My current code is :- #!/usr/bin/perl

Re: XML::Rabbit and utf8

2015-09-25 Thread Илья Рассадин
ср, 23 сент. 2015 г. в 12:26, Martin Barth : > Hello, > > i'm struggling around with umlauts in my xml files, which i want to > parse with XML::Rabbit. > I've got the same behaviour with __DATA__ or when i'm reading a xml file > via MyNode->new(file =&g

XML::Rabbit and utf8

2015-09-23 Thread Martin Barth
Hello, i'm struggling around with umlauts in my xml files, which i want to parse with XML::Rabbit. I've got the same behaviour with __DATA__ or when i'm reading a xml file via MyNode->new(file => ); And i've got non idea what i am doing wrong :( (ps: yes, th

Re: Printing dir into XML

2015-07-09 Thread Ken Slater
On Thu, Jul 9, 2015 at 6:01 AM, Nagy Tamas (TVI-GmbH) < tamas.n...@tvi-gmbh.de> wrote: > Hi, > > > > The following code doesn’t recognize dirs. As I list the dir into the XML, > it shows dirs as ordinary files. > > > > Like the –d would not work. If I ad

Printing dir into XML

2015-07-09 Thread Nagy Tamas (TVI-GmbH)
Hi, The following code doesn't recognize dirs. As I list the dir into the XML, it shows dirs as ordinary files. Like the -d would not work. If I add an extra branch to recognize files with -f, it doesn't print either files at all nor dirs. sub Traverse { opendir(DIR

Re: generate XML from recursion

2015-07-08 Thread Andy Bach
foreach my $file (@files) { # generate XML here if(-d "$dir/$file" and ($file !~ /^\.\.?$/) ) { # make dir branch Traverse("$dir/$file");

generate XML from recursion

2015-07-08 Thread Nagy Tamas (TVI-GmbH)
Hi, Thanks for the solutions of the recent problems. I would like to traverse a dir on the HDD at a part of the XML generation. So I generated about 75% of an xml file with xml::writer, and it comes a Projectstructure tag. Between these tag I simply list a dir into empty tags . If recursion is

Re: How to parse XML content using lwp agent or XML Smart

2014-08-25 Thread angus
. #!/opt/csw/bin/perl use strict; use warnings; use LWP; use XML::Smart; use CGI; my $ua = LWP::UserAgent->new; my $q = new CGI; my $doc = XML::Smart->new(); $doc->{PHC_LOGIN}{USERID} = ‘john.doe'; $doc->{PHC_LOGIN}{USERID}->set_node(1); $doc->{PHC_LOGIN}{USERPASSWORD

Re: How to parse XML content using lwp agent or XML Smart

2014-08-22 Thread Rob Dixon
On 22/08/2014 11:27, angus wrote: > Hi, > > Hi, > > I have some sample code that posts some XML content to an URL using > LWP agent and XML Smart. The response to this comes back as some > custom XML. I now need to try and parse the response and find the > REDIRECTUR

How to parse XML content using lwp agent or XML Smart

2014-08-22 Thread angus
Hi, Hi, I have some sample code that posts some XML content to an URL using LWP agent and XML Smart. The response to this comes back as some custom XML. I now need to try and parse the response and find the REDIRECTURL value and redirect the client to that destination. I am having issues

posting XML to a url and encoding issues.

2014-08-21 Thread angus
believe XML::Smart defaults to ASCII encoding or iso-8859-1 which I think are the same thing. I wonder though if LWP is using UTF-8 by default, and maybe that is causing me issues? Thanks in advance for any input you can provide. -angus #!/usr/bin/perl use LWP::UserAgent; use HTTP::Request; use

creating an XML document using xml::dom

2014-08-20 Thread angus
I am trying to recreate some code written in C# using perl. The goal is to create an XML formatted login packet and post it to http webserver and then parse the response. My first hurdle I think is to create the XML login packet. Here is the sample of what the login packet is supposed to

creating an XML document using xml::dom

2014-08-20 Thread angus
I am trying to recreate some code written in C# using perl. The goal is to create an XML formatted login packet and post it to http webserver and then parse the response. My first hurdle I think is to create the XML login packet. Here is the sample of what the login packet is supposed to

Re: Problem printing double quotes in XML using XML::DOM

2013-11-30 Thread Brian Fraser
On Sun, Dec 1, 2013 at 7:28 AM, Shaji Kalidasan wrote: > Dear Shlomi, > > I tried to install https://metacpan.org/release/XML-LibXML in my windows > setup (using Strawberry Perl 5.18.1 on Windows 7) but it failed. Please > suggest where am I going wrong? > > Here is th

Re: Problem printing double quotes in XML using XML::DOM

2013-11-30 Thread Shaji Kalidasan
Dear Shlomi, I tried to install https://metacpan.org/release/XML-LibXML in my windows setup (using Strawberry Perl 5.18.1 on Windows 7) but it failed. Please suggest where am I going wrong? Here is the output from console (command prompt) C:\demo>cpanm XML::LibXML --> Working on XML::

Re: Problem printing double quotes in XML using XML::DOM

2013-11-29 Thread Shaji Kalidasan
Dear Shlomi, I want the XML output to include double quotes instead of ".  Example:- In the following code snippet $test_method->setAttribute("name","\"$count.$attribute_act\" duration-ms=\"0\" started-at=\"0\""); I want the out

Re: Problem printing double quotes in XML using XML::DOM

2013-11-29 Thread Shlomi Fish
Hello Shaji, On Fri, 29 Nov 2013 13:32:49 +0800 (SGT) Shaji Kalidasan wrote: > Dear Perlers, > > I am trying to print double quotes in the output (output.xml) but it is > printing " instead of "". How can I include double quotes "" in the > output. Pleas

Problem printing double quotes in XML using XML::DOM

2013-11-28 Thread Shaji Kalidasan
Dear Perlers, I am trying to print double quotes in the output (output.xml) but it is printing " instead of "". How can I include double quotes "" in the output. Please help. Here is the code [code] #!/usr/bin/perl use strict; use warnings; use XML::DOM; my $parse

Re: Handling special characters in peoples names in XML

2013-07-02 Thread Jenda Krynicky
From: Gregory Machin > Thanks Terry for responding. > > The files are very big and contain data I'd prefer not to be out in the > wild. what parts of the file would be helpful , I can provide the lines > with the text and say heard part of the xml ?? > > Thanks >

Re: Handling special characters in peoples names in XML

2013-06-25 Thread Charles DeRykus
On Wed, Jun 26, 2013 at 7:45 AM, Peter Gordon wrote: > On Wed, 26 Jun 2013 12:36:01 +1200, Gregory Machin wrote: > > > >Looks like the data already is utf8, but the header of the XML > >specifies otherwise. > >How do you parse the data? Can you give us a short

Re: Handling special characters in peoples names in XML

2013-06-25 Thread Peter Gordon
On Wed, 26 Jun 2013 12:36:01 +1200, Gregory Machin wrote: > >Looks like the data already is utf8, but the header of the XML >specifies otherwise. >How do you parse the data? Can you give us a short example file? > >Jenda This is a bit of code I adapt to whichever encoding I

Re: Handling special characters in peoples names in XML

2013-06-25 Thread Gregory Machin
Thanks Terry for responding. The files are very big and contain data I'd prefer not to be out in the wild. what parts of the file would be helpful , I can provide the lines with the text and say heard part of the xml ?? Thanks G On Thu, Jun 20, 2013 at 7:42 PM, Jenda Krynicky wrote: &

Re: Handling special characters in peoples names in XML

2013-06-20 Thread Jenda Krynicky
From: Gregory Machin > I'm debugging an application written in Perl that converse data exported > from the Nessus security scanner in xml format. I have narrowed down the > bug to an issue with special characters in names that are in the file such > as Fr~A©d~A©ric and Gr~A©goi

Handling special characters in peoples names in XML

2013-06-19 Thread Gregory Machin
Hi. I'm debugging an application written in Perl that converse data exported from the Nessus security scanner in xml format. I have narrowed down the bug to an issue with special characters in names that are in the file such as Frédéric and Grégoire , thus é are most likely the guilty pa

Re: xml find text with wildcard

2012-11-12 Thread Gerhard
; Leave Me Alone > Unimportant Data > > > Find Me! > Some More Data > > > XML > [ ... ] > my $nodes = $doc->findnodes("//*[text()]"); > > my $i = 1; > foreach my $node (@$nodes) { >

xml find text with wildcard

2012-11-10 Thread shawn wilson
ings; #use Carp::Always; use Data::Dumper; use XML::LibXML; my $xml_data = < http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="null.xsd"> Find Me Some Data Leave Me Alone Unimportant Data

Re: Fast XML parser?

2012-10-31 Thread Octavian Rasnita
04". The memory could not be "read". Click on OK to terminate the program I have created a smaller XML file with only ~ 100 lines and I ran agan that script, and it worked fine. But it doesn't work with the entire xml file which has more than 200 MB, because it crashes

Re: Fast XML parser?

2012-10-31 Thread Rob Coops
uction at "0x7c910f20" referenced memory at "0x0004". The > memory could not be "read". Click on OK to terminate the program > > > > I have created a smaller XML file with only ~ 100 lines and I ran agan > that script, and it worked fine. >

Re: Fast XML parser?

2012-10-31 Thread Jenda Krynicky
e memory > could not be "read". Click on OK to terminate the program > > I have created a smaller XML file with only ~ 100 lines and I ran agan that > script, and it worked fine. > > But it doesn't work with the entire xml file which has more than 200 MB, &

Re: Fast XML parser?

2012-10-31 Thread Octavian Rasnita
From: "Jenda Krynicky" > From: "Octavian Rasnita" > To: > Subject:Fast XML parser? > Date sent: Thu, 25 Oct 2012 14:33:15 +0300 > >> Hi, >> >> Can you recommend an XML parser which is faster than XML::Tw

Re: Fast XML parser?

2012-10-30 Thread Octavian Rasnita
From: "Jenda Krynicky" > From: "Octavian Rasnita" > To: > Subject:Fast XML parser? > Date sent: Thu, 25 Oct 2012 14:33:15 +0300 > >> Hi, >> >> Can you recommend an XML parser which is faster than XML::Tw

Re: Fast XML parser?

2012-10-30 Thread Jenda Krynicky
From: "Octavian Rasnita" To: Subject: Fast XML parser? Date sent: Thu, 25 Oct 2012 14:33:15 +0300 > Hi, > > Can you recommend an XML parser which is faster than XML::Twig? > > I need to use an XML pars

Re: Fast XML parser?

2012-10-29 Thread Octavian Rasnita
From: "Shlomi Fish" On Mon, 29 Oct 2012 10:09:53 +0200 Shlomi Fish wrote: > Hi Octavian, > > On Sun, 28 Oct 2012 17:45:15 +0200 > "Octavian Rasnita" wrote: > > > From: "Shlomi Fish" > > > > Hi Octavian, > > > >

Re: Fast XML parser?

2012-10-29 Thread Octavian Rasnita
uot;Shlomi Fish" > > > Hi Octavian, ... > OK, after a short amount of investigation, I found that this program works: > > [CODE] > > use strict; > use warnings; > > use XML::LibXML::Reader; > > my $xml = 'Lexems.xml'; > > my $read

Re: Fast XML parser?

2012-10-29 Thread Rob Coops
sh" > > > > > > Hi Octavian, > > > > > > > > > > > > Hi Shlomi, > > > > > > I tried to use XML::LibXML::Reader which uses the pool parser, and I > read > > > that: > > > > > > "" > &

Re: Fast XML parser?

2012-10-29 Thread Shlomi Fish
On Mon, 29 Oct 2012 10:09:53 +0200 Shlomi Fish wrote: > Hi Octavian, > > On Sun, 28 Oct 2012 17:45:15 +0200 > "Octavian Rasnita" wrote: > > > From: "Shlomi Fish" > > > > Hi Octavian, > > > > > > > > Hi Shlomi,

Re: Fast XML parser?

2012-10-29 Thread Shlomi Fish
Hi Octavian, On Sun, 28 Oct 2012 17:45:15 +0200 "Octavian Rasnita" wrote: > From: "Shlomi Fish" > > Hi Octavian, > > > > Hi Shlomi, > > I tried to use XML::LibXML::Reader which uses the pool parser, and I read > that: > > &quo

Re: Fast XML parser?

2012-10-28 Thread Octavian Rasnita
From: "Shlomi Fish" Hi Octavian, On Thu, 25 Oct 2012 14:33:15 +0300 "Octavian Rasnita" wrote: Hi, Can you recommend an XML parser which is faster than XML::Twig? I need to use an XML parser that can parse the XML files chunk by chunk and which works faster (much fa

Re: XML::Twig installation fails

2012-10-26 Thread Shlomi Fish
> Checking if your kit is complete... > Looks good > Writing Makefile for XML::Twig > malformed JSON string, neither array, object, number, string or atom, at > charact er offset 0 (before "(end of string)") at Makefile.PL line 147. > Warning: No success on comma

XML::Twig installation fails

2012-10-25 Thread Bob McConnell
Can anyone tell me how to get this module installed on Win7? It is a requirement for ODF::lpOD. I get the following error message: -- Checking if your kit is complete... Looks good Writing Makefile for XML::Twig malformed JSON

Re: Fast XML parser?

2012-10-25 Thread Michiel Beijen
I'm sorry, I did not see Shlomi's reply, it was in my spam folder for some reason. On Thu, Oct 25, 2012 at 5:30 PM, Michiel Beijen wrote: > Hi Octavian, > > On Thu, Oct 25, 2012 at 1:33 PM, Octavian Rasnita wrote: > >> Can you recommend an XML parser which is faster

Re: Fast XML parser?

2012-10-25 Thread Michiel Beijen
Hi Octavian, On Thu, Oct 25, 2012 at 1:33 PM, Octavian Rasnita wrote: > Can you recommend an XML parser which is faster than XML::Twig? Did you try XML::LibXML ? https://www.metacpan.org/module/XML::LibXML -- Michiel -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additio

Re: Fast XML parser?

2012-10-25 Thread Shlomi Fish
Hi Octavian, On Thu, 25 Oct 2012 14:33:15 +0300 "Octavian Rasnita" wrote: > Hi, > > Can you recommend an XML parser which is faster than XML::Twig? > > I need to use an XML parser that can parse the XML files chunk by chunk and > which works faster (much faste

Fast XML parser?

2012-10-25 Thread Octavian Rasnita
Hi, Can you recommend an XML parser which is faster than XML::Twig? I need to use an XML parser that can parse the XML files chunk by chunk and which works faster (much faster) than XML::Twig, because I tried using this module but it is very slow. I tried something like the code below, but I

Re: XML file error

2012-10-07 Thread Lawrence Statton
On 10/07/2012 10:37 AM, Ajaykumar Upadhyay wrote: Hi, There is one XML file, while opening at any browser it will error. And while seeing the source of XML, all are correct. There is some truncated character in XML file who does not allow to display properly on browser. What do you mean

XML file error

2012-10-07 Thread Ajaykumar Upadhyay
Hi, There is one XML file, while opening at any browser it will error. And while seeing the source of XML, all are correct. There is some truncated character in XML file who does not allow to display properly on browser. Please tell me how I can find out that XML is proper or not

Re: XML::Twig Question

2012-09-06 Thread Brandon McCaig
On Thu, Sep 06, 2012 at 03:09:28PM -0400, Brandon McCaig wrote: > print trim($element->text()), "\n"; Sorry, I seem to have left out the definition of trim from my example.. For completeness, it would be something along these lines: sub trim { my ($string) = @_; $string =~ s/\A\s+//;

Re: XML::Twig Question

2012-09-06 Thread Brandon McCaig
On Wed, Sep 05, 2012 at 08:26:30PM +0530, Anirban Adhikary wrote: > Hi List, Hello, (Note: the first (unquoted) snippet is missing a single-quote :)) > Now in the case of following XML file > > > > vsMscServerCell > vsData1.0 > > RADIO-IU >

Re: XML::Twig Question

2012-09-05 Thread Anirban Adhikary
One thing forget to mention in the 2nd case I only able to print the value of id after removing of *xn: *from the beginning of the line.NO print for gci_sai and locationNumber . On Wed, Sep 5, 2012 at 8:26 PM, Anirban Adhikary wrote: > Hi List, > I have a XML file which looks like as f

XML::Twig Question

2012-09-05 Thread Anirban Adhikary
Hi List, I have a XML file which looks like as follows 10 1,3,4,7 12,16,21 2,3,3 1,3,6,8 12,17,25 50 AMI_BRANLY_B_1 . . And I am ble to parse it using XML::TWIG use strict; use

Re: xml parsing

2012-08-16 Thread Irfan Sayed
From: Lawrence Statton To: Irfan Sayed Cc: "beginners@perl.org" Sent: Thursday, August 16, 2012 7:28 PM Subject: Re: xml parsing Okay -- I've looked at the attachment -- remember when I mentioned namespaces a while back?  This docume

Re: xml parsing

2012-08-16 Thread Lawrence Statton
ce (I want oh-so-much to believe there's an easier solution than this, but I found this one late at night some years ago and have stuck with it ever since) This code will do what you want: #!/usr/bin/perl use strict; use warnings; use XML::LibXML; use XML::LibXML::XPathContext; my $X

Re: xml parsing

2012-08-16 Thread Lawrence Statton
please find the attached xml file. please suggest. regards irfan The file attached does not match the sample XML file you included in your email. The string passed to findnodes() is called an "XPath Selector" - you will need to adjust that to match the actual path of the el

Re: xml parsing

2012-08-16 Thread Lawrence Statton
On 08/16/2012 08:09 AM, Irfan Sayed wrote: thanks. it worked however, i cant give xml file path instead of all the contents in the start tag<< regards, irfan (BTW: The custom on this list is NOT to top post -- trim, and put your replies at the BOTTOM of the email you are respond

Re: xml parsing

2012-08-16 Thread Irfan Sayed
thanks. it worked however, i cant give xml file path instead of all the contents in the start tag << regards, irfan From: Lawrence Statton To: beginners@perl.org Sent: Thursday, August 16, 2012 6:24 PM Subject: Re: xml parsing On 08/16/2012 07

Re: xml parsing

2012-08-16 Thread 'lesleyb'
On Thu, Aug 16, 2012 at 04:55:33AM -0700, Irfan Sayed wrote: > hi, > > i need to parse the xml file and store the data in array : > > here is the code: > use XML::Simple; > > my $ItemGroup = XMLin('C:\Users\bvcontrolbuild\Desktop\data.xml'); > >

Re: xml parsing

2012-08-16 Thread Lawrence Statton
On 08/16/2012 07:46 AM, Irfan Sayed wrote: can you please give me sample code to store the xml contents to perl array using LibXML lets say xml files is as : regards irfan I'm going to assume what you wanbt is the list of Included filenames... #!/usr/bin/per

Re: xml parsing

2012-08-16 Thread Irfan Sayed
can you please give me sample code to store the xml contents to perl array using LibXML  lets say xml files is as :             regards irfan From: Shlomi Fish To: Irfan Sayed Cc: "beginners@perl.org" Sent: Thursday, August 16, 20

Re: xml parsing

2012-08-16 Thread Shlomi Fish
Hi Irfan, On Thu, 16 Aug 2012 04:55:33 -0700 (PDT) Irfan Sayed wrote: > hi, > > i need to parse the xml file and store the data in array : > > here is the code: > use XML::Simple; > > my $ItemGroup = XMLin('C:\Users\bvcontrolbuild\Desktop\data.xml

xml parsing

2012-08-16 Thread Irfan Sayed
hi, i need to parse the xml file and store the data in array : here is the code: use XML::Simple; my $ItemGroup = XMLin('C:\Users\bvcontrolbuild\Desktop\data.xml'); foreach my $BuildProject (@{$ItemGroup->{BuildProject}}) {     print $BuildProject->{Include} . "\n&

Re: problem install XML::LibXSLT on RHEL

2012-06-03 Thread pangj
*2) Now I am trying to install libxslt when I run ./configure* It gives me the following error even though i have 2.6.28 lib avaiable on /usr/local/lib. checking for libxml libraries>= 2.6.27... configure: error: Version 2.6.26 found. You need at least libxml2 2.6.27 for this version of libxslt

problem install XML::LibXSLT on RHEL

2012-06-03 Thread Perl Pra
Hi Gurus, I have written a program that uses XML::LibXSLT. When i Run the program it complain about not findind the XML/LibXSLT @INC. I have installed perl-libxml and perl-lib-xslt successfully .Still my perl progam complains about XML::LibXSLT not installed. 1) * when I run Perl MakeFile.PL

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-27 Thread Sayth Renshaw
Just an update I also found this book. http://www.amazon.com/Beginning-Perl-Web-Development-Professional/dp/1590595319 Beginning Perl Web Development: From Novice to Professional (Beginning: From Novice to Professional) [Paperback] Steve Suehring it's a good overview book but does cover a lot o

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-24 Thread Jenda Krynicky
From: David Christensen > On 04/17/2012 11:04 PM, flebber wrote: > > I also saw Perl XML - http://shop.oreilly.com/product/9780596002053.do > > These will probably both be good references > > I haven't read "Perl and XML" (nor "XML and Perl"). Ho

Re: XML::Mini question

2012-04-18 Thread Manfred Lotz
On Wed, 18 Apr 2012 22:23:37 +0200 Manfred Lotz wrote: > On Thu, 19 Apr 2012 06:15:47 +1000 > "Owen" wrote: > > > > > > Hi there, > > > I've got a question about XML::Mini. > > > > > > When parsing an xml document for some reas

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-18 Thread David Christensen
On 04/17/2012 11:04 PM, flebber wrote: Thanks David. YW. :-) I need to create an XML feed from Website data and store it in a MSSQL database. Then create queries stored procedures on that data and present the data in a web format. I will also be using MySQL but as part of my main project

Re: XML::Mini question

2012-04-18 Thread Manfred Lotz
On Thu, 19 Apr 2012 06:15:47 +1000 "Owen" wrote: > > > Hi there, > > I've got a question about XML::Mini. > > > > When parsing an xml document for some reasons I want to preserve > > white space. However, it doesn't work really. > > &

Re: XML::Mini question

2012-04-18 Thread Owen
> Hi there, > I've got a question about XML::Mini. > > When parsing an xml document for some reasons I want to preserve white > space. However, it doesn't work really. > > Minimal example: > > ! /usr/bin/perl > > > use strict; > use warnings; >

XML::Mini question

2012-04-18 Thread Manfred Lotz
Hi there, I've got a question about XML::Mini. When parsing an xml document for some reasons I want to preserve white space. However, it doesn't work really. Minimal example: ! /usr/bin/perl use strict; use warnings; use Data::Dumper; use XML::Mini::Document; my $XMLString = &

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-18 Thread Shlomi Fish
s for Perl and learning how to handle > > >> XPath,XML,SQL, XQuery. > > >> I would like to know better how to handle and retrieve text formats > > >> and utilise database storage of the data. > > > Sorry I should have pointed out in ref to above I meant

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-18 Thread Klaus Jantzen
David Christensen wrote: On 04/17/2012 08:28 PM, flebber wrote: Can anyone recommend a good book/s for Perl and learning how to handle XPath,XML,SQL, XQuery. I would like to know better how to handle and retrieve text formats and utilise database storage of the data. Sorry I should have

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-17 Thread flebber
On Apr 18, 2:50 pm, dpchr...@holgerdanske.com (David Christensen) wrote: > On 04/17/2012 08:28 PM, flebber wrote: > > >> Can anyone recommend a good book/s for Perl and learning how to handle > >> XPath,XML,SQL, XQuery. > >> I would like to know better how to

Re: Book Recommendation - XPath, XML,SQL, XQuery

2012-04-17 Thread David Christensen
On 04/17/2012 08:28 PM, flebber wrote: Can anyone recommend a good book/s for Perl and learning how to handle XPath,XML,SQL, XQuery. I would like to know better how to handle and retrieve text formats and utilise database storage of the data. Sorry I should have pointed out in ref to above I

  1   2   3   4   5   6   7   8   9   10   >