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="CentOS Linux 7 (Core)" > > Is there

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 required at .../LibXML.pm line 1393 > >

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("JJ")); $root->appendChild($doc->createCommen

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-digest-h...@perl.org wrot

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
Chas. Owens schrieb: 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: Thanks! That kinda works: #!/usr/bin/perl use strict; use warnings; use fea

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 to handle an

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't retrieve the inner loop() eleme

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. I'm not sure how you intend to

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 error and correct me. >

Re: XML::Rabbit and utf8

2015-09-25 Thread Илья Рассадин
Hi, Martin! First, specify UTF-8 binmode for STDOUT, it's good practice if you printing unicode characters. Second and main, problem here is that your umlaut character has not ord 195. More over, the way you construct umlaut character give you not a single character but unicode grapheme. You can

Re: xml find text with wildcard

2012-11-12 Thread Gerhard
On Sat, Nov 10, 2012 at 05:33:31PM +, shawn wilson wrote: > [ ... ] > my $xml_data = < > http://www.w3.org/2001/XMLSchema-instance"; > xsi:noNamespaceSchemaLocation="null.xsd"> > > Find Me > Some Data > > > Leave Me Alone > Unimportant Data >

Re: XML::Twig installation fails

2012-10-26 Thread Shlomi Fish
Hi Bob, On Thu, 25 Oct 2012 16:28:02 + Bob McConnell wrote: > 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 k

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 t

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 > INVALID > 3GCell >

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 follows >

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
Okay -- I've looked at the attachment -- remember when I mentioned namespaces a while back? This document uses one, so things get more complicated. The solution I always use for this is to put the root element into an XPath Context object and assign a prefix for the default namespace (I wa

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 elements you

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 responding to) Ca

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'); > > foreach my $BuildProject (@{$ItemGroup->{BuildPro

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/perl use st

Re: xml parsing

2012-08-16 Thread Irfan Sayed
12 6:07 PM Subject: Re: xml parsing 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\bvcontrolbu

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'); > > foreach my $BuildProject (@{$ItemGrou

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 reasons I want to preserve > > > white space. However, it doesn't work

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. > > > > Minimal example: > > > > ! /usr/bin/perl > > > > > > use st

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; > use Data::Dumper; > use XML::Mini::Document; > > my $

Re: XML::Twig Doubt

2012-03-20 Thread Anirban Adhikary
Thanks a lot Rob for your nice help. Best Regards Anirban Adhikary. On Tue, Mar 20, 2012 at 4:38 PM, Rob Dixon wrote: > On 19/03/2012 14:45, Anirban Adhikary wrote: > >> On Mon, Mar 19, 2012 at 7:41 PM, Rob Dixon wrote: >>> XML::Twig uses callbacks to process pieces of the XML that y

Re: XML::Twig Doubt

2012-03-20 Thread Rob Dixon
On 19/03/2012 14:45, Anirban Adhikary wrote: On Mon, Mar 19, 2012 at 7:41 PM, Rob Dixon wrote: XML::Twig uses callbacks to process pieces of the XML that you have defined. In this case you are interested only in the start tag so you can define a "start tag handler". Using $twig->purge empties

Re: XML::Twig Doubt

2012-03-20 Thread Rob Dixon
On 19/03/2012 15:12, Anirban Adhikary wrote: Hi, When I am trying to print the value against the tag ALPHA it is not prints anything,though it is not showing any warnings. use strict; use warnings; use XML::Twig; my $twig = XML::Twig->new(start_tag_handlers => { BSC => \&on_BSC }); sub

Re: XML::Twig Doubt

2012-03-19 Thread Anirban Adhikary
Hi List, When I have changed the method from my $twig = XML::Twig->new(start_tag_ handlers => { BSC => \&on_BSC }); to my $twig = XML::Twig->new(TwigHandlers => { BSC => \&on_BSC }); I am able to print the value against the ALPHA tag. Thanks to you for your support. Best Regards Anirban A

Re: XML::Twig Doubt

2012-03-19 Thread Anirban Adhikary
Hi, When I am trying to print the value against the tag ALPHA it is not prints anything,though it is not showing any warnings. use strict; use warnings; use XML::Twig; my $twig = XML::Twig->new(start_tag_handlers => { BSC => \&on_BSC }); sub on_BSC { my($twig, $bsc)= @_; print $bsc->id, "\

Re: XML::Twig Doubt

2012-03-19 Thread Anirban Adhikary
Hi Rob, Thanks for your support.The code does exactly what I want . Can you please suggest me a tutorials with good examples on XML::Twig. Another thing can you please explain me this line in the code my($twig, $bsc)= @_; Best Regards Anirban Adhikary. On Mon, Mar 19, 2012 at 7:4

Re: XML::Twig Doubt

2012-03-19 Thread Rob Dixon
On 19/03/2012 13:10, Anirban Adhikary wrote: 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 . . Now my qu

Re: XML parsing question

2012-03-15 Thread Shlomi Fish
Hi Anirban, On Thu, 15 Mar 2012 20:41:31 +0530 Anirban Adhikary wrote: > I am writting a following code to parse this xml but not able yo understand > that why the value of $bsc_id_1 getting changed. > here is my code > > use strict; > use warnings; > > my $xml_file_to_read = "BSC-19478.xml";

Re: XML parsing question

2012-03-15 Thread Shawn H Corey
On 12-03-15 01:32 PM, Graeme St.Clair wrote: I agree with Lawrence! I am currently using two older packages called XML::SAX and XML::SAX::Expat ; they may well be a bit old-fashioned, but they work for me. I would suggest XML::Twig -- Just my 0.0002 million dollars worth, Shawn Progr

Re: XML parsing question

2012-03-15 Thread Graeme St.Clair
: anirban.adhik...@gmail.com Subject: Re: XML parsing question On 03/15/2012 09:11 AM, Anirban Adhikary wrote: I am writting a following code to parse this xml but not able yo understand that why the value of $bsc_id_1 getting changed. here is my code use strict; use warnings; my

Re: XML parsing question

2012-03-15 Thread Lawrence Statton
On 03/15/2012 09:11 AM, Anirban Adhikary wrote: > I am writting a following code to parse this xml but not able yo understand > that why the value of $bsc_id_1 getting changed. > here is my code > > use strict; > use warnings; > > my $xml_file_to_read = "BSC-19478.xml"; > my $counter = 1; > my $

Re: XML parsing question

2012-03-15 Thread Anirban Adhikary
I am writting a following code to parse this xml but not able yo understand that why the value of $bsc_id_1 getting changed. here is my code use strict; use warnings; my $xml_file_to_read = "BSC-19478.xml"; my $counter = 1; my $bsc_id_1; my $bsc_id; open my $RFH,'<',$xml_file_to_read or die "Can'

Re: XML parsing question

2012-03-15 Thread Shawn H Corey
On 12-03-15 11:01 AM, Anirban Adhikary wrote: I need to create a new xml file from this xml. Now I need to store the first BSC id and need to check it against the other BSC ids. If both ids are same then I need to write the the contents of between the BSC id tag in a new xml file. What have you

Re: XML QUERY

2012-02-16 Thread timothy adigun
Hi Anirban, On Wed, Feb 15, 2012 at 8:19 PM, Anirban Adhikary < anirban.adhik...@gmail.com> wrote: > > > > Hi List , > > I have two files one is a csv file another is a XML files which are > given here as attachments. > > Now I need to create a XML(Which is given here) file from this CSV > file(A

RE: XML::Xerces

2012-01-19 Thread Clay Lovett
meant. Not a novice. Clay -Original Message- From: John SJ Anderson [mailto:geneh...@genehack.org] Sent: Thursday, January 19, 2012 9:36 AM To: beginners@perl.org Subject: Re: XML::Xerces On Thursday, January 19, 2012 at 09:22 , Clay Lovett wrote: > Any ideas? I know i

Re: XML::Xerces

2012-01-19 Thread John SJ Anderson
On Thursday, January 19, 2012 at 09:22 , Clay Lovett wrote: > Any ideas? I know it has to be something simple that I am just missing. > > > Frequently, RPMs build $PACKAGE and $PACKAGE-dev -- and the latter has all the headers that are required to build anything against $PACKAGE. Make sure yo

RE: XML::Xerces

2012-01-19 Thread Clay Lovett
I am trying to build the XML::Xerces module for RHEL 6. I have successfully compiled and install the rpm xerces-c-2.7.0-3.x86_64.rpm and this works to fill the prerequisite nicely. When I run the command: cpan XML::Xerces I get the following errors: Xerces.cpp:1219: error: expected unqualified

Re: XML suggestions

2011-07-20 Thread Jenda Krynicky
From: Rob Coops > It really depends on what you are looking to do though, if you are aiming > for just a simple thing with only a few messages then don't worry > about XML::LibXML > and go for XML::Simple which is more then enough in most simple cases ;-) Except that it's not so simple to set i

Re: XML suggestions

2011-07-13 Thread Rob Coops
On Wed, Jul 13, 2011 at 3:27 AM, Feng He wrote: > 2011/7/13 Doug Bradbury : > > Does anyone have suggestions for an active and easy to use XML building & > parsing module? > > > > For a simple XML parsing I have used the module XML::Simple which just run > well. > > Regards. > > -- > To unsubscri

Re: XML suggestions

2011-07-12 Thread Feng He
2011/7/13 Doug Bradbury : > Does anyone have suggestions for an active and easy to use XML building & > parsing module? > For a simple XML parsing I have used the module XML::Simple which just run well. Regards. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: XML suggestions

2011-07-12 Thread Rob Dixon
On 12/07/2011 19:07, Doug Bradbury wrote: Does anyone have suggestions for an active and easy to use XML building & parsing module? Hi Doug Any code to write XML ends up looking very similar to the resulting XML itself, although XML::Writer will make sure your syntax is correct for you and av

Re: XML Challenge Cannot

2010-12-20 Thread Uri Guttman
> "CY" == Chaitanya Yanamadala writes: CY> Dear URI CY> Thank u for the reply. there is no word 'u' in the english language. use proper wording here as this isn't text messaging. CY> I told the guy that what ever output he has shown to me is not CY> giving the correct output, so i

Re: XML Challenge Cannot

2010-12-19 Thread Brian Fraser
Woah, what a twat. A quick search shows you've posted on this list several times, and have been linked[0] to[1] several[2] guides[3] on[4] style[5] and[6] good[7] coding[8]. How about giving them a read, maybe learning something out of them, and not asking us to do your job for you? It's our busin

Re: XML Challenge Cannot

2010-12-19 Thread Chaitanya Yanamadala
Dear URI Thank u for the reply. I told the guy that what ever output he has shown to me is not giving the correct output, so i asked him abt the XSL as i am new to that concept. but the guy started taking this in the wrong way and started making this nonsense... Thank you for ur reply again. Cha

Re: XML Challenge Cannot

2010-12-19 Thread Uri Guttman
> "CY" == Chaitanya Yanamadala writes: CY> Guys i have explained problem to u and asked for help. If u can CY> then ok or else mind ur own business.. instead of making this much CY> mess up.. and this is not a homework that i have asked u.. lighten up. this is a list for teaching perl

Re: XML Challenge Cannot

2010-12-19 Thread Chaitanya Yanamadala
Guys i have explained problem to u and asked for help. If u can then ok or else mind ur own business.. instead of making this much mess up.. and this is not a homework that i have asked u.. Chaitanya On Sun, Dec 19, 2010 at 7:08 AM, Bill Luebkert wrote: > On 12/18/2010 5:00 PM, Jenda Krynicky

Re: XML Challenge Cannot

2010-12-19 Thread Bill Luebkert
On 12/18/2010 5:00 PM, Jenda Krynicky wrote: 1. Learn to spell. 2. Learn to describe your questions in the necessary detail. 3. This is not a free script writing service. Even if you did succeed in describing the "required" output properly what makes you think we are going to waste time writin

Re: XML Challenge Cannot

2010-12-19 Thread Liam R E Quin
On Sat, 2010-12-18 at 13:16 +0530, Chaitanya Yanamadala wrote: > Thank you for the reply. Thank u for letting me know an alternative for > this. But there is a problem with what you have sent. > It is not just removing of the bottom group tag that is required. I'm not going to do your school hom

Re: XML Challenge Cannot

2010-12-18 Thread Jenda Krynicky
From: Chaitanya Yanamadala > Hai Liam > Thank you for the reply. Thank u for letting me know an alternative for > this. But there is a problem with what you have sent. > It is not just removing of the bottom group tag that is required. > > If you check the input then u can find out that the ti

Re: XML Challenge Cannot

2010-12-17 Thread Chaitanya Yanamadala
Hai Liam Thank you for the reply. Thank u for letting me know an alternative for this. But there is a problem with what you have sent. It is not just removing of the bottom group tag that is required. If you check the input then u can find out that the title Commentary has 3 sub tags Letters, Boo

Re: XML::Simple XMLin

2010-07-28 Thread Jasper2000
Brandon / Erez, Thanks very much for your help. Not sure why, but I did post another message, to say that I'd managed to figure it out, yet the message didn't show up. However, I really do appreciate your comments and willingness to help me. Thanks!! On Jul 28, 6:10 pm, bamcc...@gmail.com (Bra

Re: XML::Simple XMLin

2010-07-28 Thread Jane D.
Actually, I have now figured it out, and it all makes sense! Thanks for your help. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: XML::Simple XMLin

2010-07-28 Thread Brandon McCaig
On Tue, Jul 27, 2010 at 6:31 PM, Jane D. wrote: > The top bit of the XML file looks like this: It would be easier for me to make suggestions if you'd post an entire sample XML document or, better yet, a URL where I could retreive one so that I could test my code before suggesting it to you. :) -

Re: XML::Simple XMLin

2010-07-28 Thread Erez Schatz
First, I urge you to try parsing this doc with a dedicated RSS parser, it will do miracles for your needs. Second, the dumper you print here is not the full document, but one branch, it might be that what you loop over is not an arrayref, or might not work the way you think. Try running a Dumper ov

Re: XML::Simple XMLin

2010-07-28 Thread Jasper2000
Thanks Erez ... However, I did already look at the data in Data:Dumper, and still can't figure out how to access it. Mind you, I have done an identical loop for other XML data, from other sources, and it works fine (even with the element set to 0, which I don't quite get). Mind you, if it's of any

Re: XML::Simple XMLin

2010-07-27 Thread Erez Schatz
On 28 July 2010 01:31, Jane D. wrote: > > I'm basically retrieving an XML file from Digg. I can retrieve the > Digg data okay, but am struggling with trying to process the returned > data with Perl, largely on account with my unfamiliarity with XML > processing, but also because I'm not entirely c

Re: XML output processing question

2010-06-26 Thread Jenda Krynicky
From: saw > Given one large XML file such as: > > > > > > > > > I want to create many small XML files consisting of a Root element and > the sub-tree. I would like to copy the sub-tree from input to > output as a block without having to address the sub-components. I ha

Re: XML output processing question

2010-06-20 Thread Shlomi Fish
On Friday 18 Jun 2010 17:02:39 saw wrote: > Given one large XML file such as: > > > > > > > > > I want to create many small XML files consisting of a Root element and > the sub-tree. I would like to copy the sub-tree from input to > output as a block without having to ad

Re: XML::LibXML::Reader source specification error

2010-06-12 Thread Shlomi Fish
Hi perlatwork, On Saturday 12 Jun 2010 19:59:55 perl wrote: > I tried to use LibXML .. when i never to the correct libXML read file > ... when i tried to use the LWP download which is an XML .. how to use > it please help me ... > First of all, add "use strict;" and "use warnings;". That would

Re: XML::XPath got some error creating a new parsing

2010-06-03 Thread Shlomi Fish
On Thursday 03 Jun 2010 19:30:37 Shawn H Corey wrote: > On 10-06-03 12:20 PM, Shlomi Fish wrote: > > Hi, > > > > Don't use XML-XPath - use XML-LibXML instead: > > > > http://search.cpan.org/dist/XML-LibXML/ > > OK, why? 1. XML-LibXML has been better maintained. (The last release of XML-XPath wa

Re: XML::XPath got some error creating a new parsing

2010-06-03 Thread Shawn H Corey
On 10-06-03 12:20 PM, Shlomi Fish wrote: Hi, Don't use XML-XPath - use XML-LibXML instead: http://search.cpan.org/dist/XML-LibXML/ OK, why? -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. The secret to

Re: XML::XPath got some error creating a new parsing

2010-06-03 Thread Shlomi Fish
Hi, Don't use XML-XPath - use XML-LibXML instead: http://search.cpan.org/dist/XML-LibXML/ Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap God

Re: XML value fetching

2010-05-25 Thread Klaus
On 19 mai, 11:12, dr.virus.in...@gmail.com (Chaitanya Yanamadala) wrote: > hai i require one more help > i have an xml like this > > [ snip XML ] > > now what i wanted is that i need to fetch the values of tag email and show > them. > how do i do it.. > > use XML::Simple; > > my $conf=XMLin('x.xml'

Re: XML Replace

2010-05-02 Thread Klaus
On 28 avr, 19:12, trevor.do...@gmail.com (Trev) wrote: > I'm trying to use Perl to replace a line in a few XML files I have. > > Example XML below, I'm wanting to change the Id= part from  Id="/Local/ > App/App1" to Id=/App1". I know there's an easy way to do this with > perl alone however I'm tryi

Re: XML Replace

2010-04-30 Thread Shlomi Fish
Hi, sorry for the late response. On Wednesday 28 Apr 2010 20:12:36 Trev wrote: > I'm trying to use Perl to replace a line in a few XML files I have. > > Example XML below, I'm wanting to change the Id= part from Id="/Local/ > App/App1" to Id=/App1". I know there's an easy way to do this with >

Re: XML Replace

2010-04-30 Thread Brad Baxter
Trev wrote: I'm trying to use Perl to replace a line in a few XML files I have. Example XML below, I'm wanting to change the Id= part from Id="/Local/ App/App1" to Id=/App1". I know there's an easy way to do this with perl alone however I'm trying to use XML::Simple or any XML plugin for perl.

Re: XML Parser Error

2010-04-16 Thread Open Source
> - Original Message - > From: Brad Baxter > Sent: 04/16/10 01:31 AM > To: beginners@perl.org > Subject: Re: XML Parser Error > On 4/15/2010 1:40 PM, Open Source wrote: > I'm getting this error: > > Undefined subroutine&XML::Simple::XMLin called at ./

Re: XML Parser Error

2010-04-16 Thread Brad Baxter
On 4/15/2010 1:40 PM, Open Source wrote: I'm getting this error: Undefined subroutine&XML::Simple::XMLin called at ./sample.pl line 3. Here's my code and input file: use XML::Simple; use Data::Dumper; $data = XMLin("sample.xml"); print Dumper($data); John 43 M Operations There mu

RE: XML Parser Error

2010-04-16 Thread Wagner, David --- Senior Programmer Analyst --- CFS
>-Original Message- >From: Open Source [mailto:open.sou...@gmx.com] >Sent: Thursday, April 15, 2010 11:41 >To: Beginners, Perl >Subject: XML Parser Error > >I'm getting this error: > >Undefined subroutine &XML::Simple::XMLin called at ./sample.pl line 3. > >Here's my code and input file: >

Re: XML Parsing/Modules

2010-04-07 Thread Shlomi Fish
/10 04:00 AM > > To: Robert Wohlfarth > > Subject: Re: XML Parsing/Modules > > Robert Wohlfarth wrote: > > On Wed, Apr 7, 2010 at 2:39 PM, Open Source wrote: > >> I'm new to perl and I need to parse an file which contains both > >> structured and unstructu

Re: XML Parsing/Modules

2010-04-07 Thread Open Source
Thanks Shawn/Rob! I'll give a try now. one more thing, anyway to convert these parsed output to html format directly with the help another module? > - Original Message - > From: Shawn H Corey > Sent: 04/08/10 04:00 AM > To: Robert Wohlfarth > Subject: Re: XML Parsi

Re: XML Parsing/Modules

2010-04-07 Thread Shawn H Corey
Robert Wohlfarth wrote: On Wed, Apr 7, 2010 at 2:39 PM, Open Source wrote: I'm new to perl and I need to parse an file which contains both structured and unstructured XML messages. Can someone help me to understand how to parse XML files/data into either simple readable or html format? I'm not

Re: XML Parsing/Modules

2010-04-07 Thread Robert Wohlfarth
On Wed, Apr 7, 2010 at 2:39 PM, Open Source wrote: > I'm new to perl and I need to parse an file which contains both structured > and unstructured XML messages. Can someone help me to understand how to > parse XML files/data into either simple readable or html format? I'm not > sure how to procee

Re: XML to RDF using O O Perl

2010-02-10 Thread Jeff Peng
On Thu, Feb 11, 2010 at 6:00 AM, Aravind Venkatesan wrote: > Hello, > > I am new to perl. I am trying write a Perl module to convert KGML (XML file) > to RDF format .  Could anybody suggest as to how to go about this (just to > give me a start). > Hi, You may pick a book for learning some base k

Re: XML to RDF using O O Perl

2010-02-10 Thread Owen
> Hello, > > I am new to perl. I am trying write a Perl module to convert KGML (XML > file) to RDF format . Could anybody suggest as to how to go about > this > (just to give me a start). Absolutely no idea, but did you search CPAN http://search.cpan.org/ Searching on rdf and xml threw up many

Re: XML and representations

2010-01-30 Thread Rob Dixon
You misunderstand my solution Bruce. If you set the options as I described, you will have a hash element that looks like 'phone2' => undef instead of the awkward 'phone2' => {} This would be my preference instead of suppressing the empty element altogether, which leaves no indication at

Re: XML and representations

2010-01-30 Thread Bruce Ferrell
Thanks Rob, I'm glad you validated the solution I found. I figured out that if the empty tag was suppressed, I could test for the tag being present or not. Bruce On 01/30/2010 04:16 AM, Rob Dixon wrote: > Hello Bruce > > Take a closer look at the docs, and try > > my $xml = XMLin($data, Supp

Re: XML and representations

2010-01-30 Thread Rob Dixon
Hello Bruce Take a closer look at the docs, and try my $xml = XMLin($data, SuppressEmpty => undef); HTH, Rob Bruce Ferrell wrote: I have a wee problem I can seem to solve. I don't want to get into should XML::Simple be used, it's not relevant to my question... I don't think. Below is so

Re: XML and representations

2010-01-29 Thread Jim Gibson
On 1/29/10 Fri Jan 29, 2010 1:34 PM, "Bruce Ferrell" scribbled: > Perl monks, > > I have a wee problem I can seem to solve. I don't want to get into > should XML::Simple be used, it's not relevant to my question... I don't > think. Below is some very simple XML and below that the output after

Re: XML::Simple parsing with attributes

2010-01-25 Thread Dr.Ruud
Shlomi Fish wrote: XML::Compile seems to be for SOAP, which is a subset of the general XML functionality. It looks to me like your reading problems are still not over. In its documentation it says to be about "translate between XML and nested hashes". And also about validation. And also abo

Re: XML::Simple parsing with attributes

2010-01-22 Thread Jenda Krynicky
From: Shlomi Fish > On Friday 22 Jan 2010 00:44:39 Jenda Krynicky wrote: > > From: Shlomi Fish > > > > > > This because you can very well represent XML in Perl data structures > > > > without any loss of complexity. See for example XML::Compile. > > > > > > Wrong! If for example you have someth

Re: XML::Simple parsing with attributes

2010-01-22 Thread Shlomi Fish
On Friday 22 Jan 2010 00:44:39 Jenda Krynicky wrote: > From: Shlomi Fish > > > > This because you can very well represent XML in Perl data structures > > > without any loss of complexity. See for example XML::Compile. > > > > Wrong! If for example you have something like {{{ Hello this is a > h

Re: XML::Simple parsing with attributes

2010-01-21 Thread Jenda Krynicky
From: Shlomi Fish > > This because you can very well represent XML in Perl data structures > > without any loss of complexity. See for example XML::Compile. > > Wrong! If for example you have something like {{{ Hello this is a href="http://www.example.tld/";>link for something }}}, then > XML-S

Re: XML::Simple parsing with attributes

2010-01-21 Thread Jenda Krynicky
Date sent: Fri, 15 Jan 2010 11:11:55 -0800 Subject:XML::Simple parsing with attributes From: Grant To: Perl Beginners List > Anybody here familiar with XML::Simple? I need to parse some XML that > looks like this: > > > > bas

  1   2   3   4   >