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

Re: XML::Simple parsing with attributes

2010-01-20 Thread Brad Baxter
On 1/15/2010 2:11 PM, Grant wrote: Anybody here familiar with XML::Simple? I need to parse some XML that looks like this: base64datahere base64datahere base64datahere I need to be able to grab the correct set of base64 data. Does anyone know how to do that? - Grant The "correct set"?

Re: XML::Simple parsing with attributes

2010-01-18 Thread Dr.Ruud
Shlomi Fish wrote: On Saturday 16 Jan 2010 14:32:13 Dr.Ruud wrote: Shlomi Fish wrote: rindolf: XML::Simple commits the fatal flaw of trying to massage complicated and often irregular XML into the simple and highly regular world of perl data structures. That is a strange sentence. I think w

Re: XML::Simple parsing with attributes

2010-01-16 Thread Grant
> > base64datahere > base64datahere > base64datahere > > > > >>> #!/usr/bin/perl >>> >>> use strict; >>> use warnings; >>> use XML::Simple; >>> >>> my $data = XMLin($path_to_file); >>> >>> foreach my $image (@{$data->{Label}->{Image}}) { >>>        print "$image

Re: XML::Simple parsing with attributes

2010-01-16 Thread Shlomi Fish
On Saturday 16 Jan 2010 14:32:13 Dr.Ruud wrote: > Shlomi Fish wrote: > > On Friday 15 Jan 2010 21:11:55 Grant wrote: > >> Anybody here familiar with XML::Simple? I need to parse some XML that > > > >> looks like this: > > Don't use XML::Simple. It is anything but. > > > > { > >

Re: XML::Simple parsing with attributes

2010-01-16 Thread Erez Schatz
2010/1/16 Grant : >>> base64datahere base64datahere base64datahere >> #!/usr/bin/perl >> >> use strict; >> use warnings; >> use XML::Simple; >> >> my $data = XMLin($path_to_file); >> >> foreach my $image (@{$data->{Label}->{Image}}) { >>        print "$image-

Re: XML::Simple parsing with attributes

2010-01-16 Thread Dr.Ruud
Shlomi Fish wrote: On Friday 15 Jan 2010 21:11:55 Grant wrote: Anybody here familiar with XML::Simple? I need to parse some XML that looks like this: Don't use XML::Simple. It is anything but. { You need to get rid of those ugly things, they make your postings utterly

Re: XML::Simple parsing with attributes

2010-01-16 Thread Shlomi Fish
On Saturday 16 Jan 2010 17:17:12 Grant wrote: > >> Anybody here familiar with XML::Simple? I need to parse some XML that > > > >> looks like this: > > Don't use XML::Simple. It is anything but. > > > > { > > perlbot: xml::Simple > > rindolf: XML::Simple commits the fatal flaw o

Re: XML::Simple parsing with attributes

2010-01-16 Thread Grant
>> >>> >>> base64datahere >>> base64datahere >>> base64datahere >>> >>> >>> >>> I need to be able to grab the correct set of base64 data.  Does anyone >>> know how to do that? > > It's a common practice, to avoid using XML::Simple. It's also a common > practice not to give practical suggestions

Re: XML::Simple parsing with attributes

2010-01-16 Thread Grant
>> Anybody here familiar with XML::Simple?  I need to parse some XML that >> looks like this: >> > > Don't use XML::Simple. It is anything but. > > { > perlbot: xml::Simple > rindolf: XML::Simple commits the fatal flaw of trying to massage > complicated and often irregular XML int

Re: XML::Simple parsing with attributes

2010-01-15 Thread Erez Schatz
> >> >> base64datahere >> base64datahere >> base64datahere >> >> >> >> I need to be able to grab the correct set of base64 data.  Does anyone >> know how to do that? It's a common practice, to avoid using XML::Simple. It's also a common practice not to give practical suggestions. Since you *di

Re: XML::Simple parsing with attributes

2010-01-15 Thread Shlomi Fish
On Friday 15 Jan 2010 21:11:55 Grant wrote: > Anybody here familiar with XML::Simple? I need to parse some XML that > looks like this: > Don't use XML::Simple. It is anything but. { perlbot: xml::Simple rindolf: XML::Simple commits the fatal flaw of trying to massage complic

Re: XML::Simple question

2009-12-23 Thread Mike Blezien
- Original Message - From: "Jenda Krynicky" To: "Perl List" Sent: Tuesday, December 22, 2009 6:44 PM Subject: Re: XML::Simple question From: "Mike Blezien" Hello, were using the XML/Simple module to process a XML response using the code

Re: XML::Simple question

2009-12-22 Thread Jenda Krynicky
From: "Mike Blezien" > Hello, > > were using the XML/Simple module to process a XML response using the code > below. > But for some reason the module can't read the $xmlresponse data unless we > create > a temp file first to store the data then pass that to the module. Is th

Re: XML::Simple question

2009-12-22 Thread Mike Blezien
- Original Message - From: "Robert Wohlfarth" To: "Perl List" Sent: Tuesday, December 22, 2009 5:47 PM Subject: Re: XML::Simple question On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote: were using the XML/Simple module to process a XML response using the

Re: XML::Simple question

2009-12-22 Thread Robert Wohlfarth
On Tue, Dec 22, 2009 at 9:54 AM, Mike Blezien wrote: > were using the XML/Simple module to process a XML response using the code > below. But for some reason the module can't read the $xmlresponse data > unless we create a temp file first to store the data then pass that to the > module. Is there

Re: xml simple question

2009-10-23 Thread Shlomi Fish
On Friday 23 Oct 2009 15:16:15 Shawn H Corey wrote: > getget wrote: > > The content of 2 files output.xml and input.xml are different. How can > > I create the output file its content the same with input.xml. > > Use a different parser than XML::Simple. I suggest XML::Twig. > > XML::Simple does

Re: xml simple question

2009-10-23 Thread Shawn H Corey
getget wrote: > The content of 2 files output.xml and input.xml are different. How can > I create the output file its content the same with input.xml. Use a different parser than XML::Simple. I suggest XML::Twig. XML::Simple does not distinguish between attributes and content. Because of this, i

Re: XML::Simple question

2008-10-22 Thread Richard Lee
Rob Dixon wrote: Richard Lee wrote: while trying to study the article on perlmonks.org, http://perlmonks.org/?node_id=490846 regarding XML parsing, I need bit of clarfication. how do I parse out http://www.oreilly.com/catalog/covers/perlbp.s.gif"; width="145" height="190" />

Re: XML::Simple question

2008-10-22 Thread Rob Dixon
Richard Lee wrote: > while trying to study the article on perlmonks.org, > > http://perlmonks.org/?node_id=490846 > > regarding XML parsing, I need bit of clarfication. > > how do I parse out > > http://www.oreilly.com/catalog/covers/perlbp.s.gif"; > width="145" height="190" /> >

Re: XML::Simple question

2008-10-22 Thread Dr.Ruud
Richard Lee schreef: > how do I parse out > > http://www.oreilly.com/catalog/covers/perlbp.s.gif"; > width="145" height="190" /> > > I tried $book->{image}->{src}... but doesn't work.. > > use XML::Simple qw(:strict); > > my $library = XMLin($filename, > ForceArray => 1, >

Re: XML::Simple Environment errors

2008-07-24 Thread Jenda Krynicky
From: "Gorrebeeck, Robert" <[EMAIL PROTECTED]> > bash-3.2$ perl -mXML::Parser -e 'print "$XML::Parser::VERSION"' > > Can't load > '/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/XML/Parser/Expat > /Expat.so' for module XML::Parser::Expat: ld.so.1: perl: fatal: > libgcc_s.so.1: open failed

Re: XML::Simple help request

2006-08-22 Thread Owen
On Tue, 22 Aug 2006 09:13:47 +0100 Gary Stainburn <[EMAIL PROTECTED]> wrote: > On Tuesday 22 August 2006 05:32, Owen Cook wrote: > > I am trying to get email addresses out of a Sylpheed address book. The > > output of Dumper is; > > > > $VAR1 = { > > 'attribute-list' => [ > >

Re: XML::Simple help request

2006-08-22 Thread Mumia W.
On 08/21/2006 11:32 PM, Owen Cook wrote: I am trying to get email addresses out of a Sylpheed address book. The output of Dumper is; $VAR1 = { 'attribute-list' => [ {} ], 'first-name' => '', 'uid' => '1581494

Re: XML::Simple help request

2006-08-22 Thread Gary Stainburn
On Tuesday 22 August 2006 05:32, Owen Cook wrote: > I am trying to get email addresses out of a Sylpheed address book. The > output of Dumper is; > > $VAR1 = { > 'attribute-list' => [ > {} > ], > 'first-name' => '', >

Re: XML: :Simple -- still can't print: Dumper OK

2006-07-26 Thread Mumia W.
On 07/26/2006 11:08 AM, BW wrote: And please don't snip attributions. Firstly, to make sure I'm exercising proper etiquette here, could you please explain what I snipped so that I don't do that in the future? I finally got this working. I'd been leaving out one of the items in my hash derefere

Re: XML: :Simple -- still can't print: Dumper OK

2006-07-26 Thread BW
> And please don't snip attributions. Firstly, to make sure I'm exercising proper etiquette here, could you please explain what I snipped so that I don't do that in the future? I finally got this working. I'd been leaving out one of the items in my hash dereference string. Once I put that item i

Re: XML: :Simple -- still can't print: Dumper OK

2006-07-25 Thread Mumia W.
On 07/25/2006 03:36 PM, BW wrote: Mumia W. wrote: Did you enable ForceArray? Did you use Data::Dumper to look at the structure of what XML::Simple returned? Yes to both. I've attached the Dumper output. (outp.txt). Given the attached xml file, and your first snippet/example, I tried to do s

Re: XML: :Simple -- still can't print: Dumper OK

2006-07-25 Thread BW
> Did you enable ForceArray? > > Did you use Data::Dumper to look at the structure of what XML::Simple returned? Yes to both. I've attached the Dumper output. (outp.txt). Given the attached xml file, and your first snippet/example, I tried to do something very simple: print out my dataschema n

RE: XML: :Simple -- can't print still: config problem?

2006-07-25 Thread Venkat Saranathan
with warm regards, Venkat Saranathan Gulf Breeze Software www.gulfsoft.com GulfBreeze Blog www.gulfsoft.com/blog -Original Message- From: brian bwarn [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 25, 2006 11:50 AM To: beginners@perl.org Subject: RE: XML: :Simple -- can't print still:

Re: XML: :Simple -- can't print still: config problem?

2006-07-25 Thread Mumia W.
On 07/25/2006 10:49 AM, brian bwarn wrote: Thank you both for your replies. I'm still not having success with either Venkat's or Mumia's version of the foreach loop. [...] Did you enable ForceArray? Did you use Data::Dumper to look at the structure of what XML::Simple returned? -- To uns

RE: XML: :Simple -- can't print still: config problem?

2006-07-25 Thread brian bwarn
Thank you both for your replies. I'm still not having success with either Venkat's or Mumia's version of the foreach loop. I tried an example of something that should work--namely Listing C using the source in Listing A of the how-to article at http://builder.com.com/5100-6371-5363190.html. I ca

Re: XML::Simple -- can't get anything to print from array

2006-07-24 Thread Mumia W.
On 07/24/2006 04:59 PM, brian bwarn wrote: I'm just starting out with XML::Simple and can't get any output to display to STDOUT. What am I missing? --- Source XML snippet: --- > [snipped] Use the ForceArray option to make traversal easier. Use Data::Dumper to

Re: xml::simple

2005-07-25 Thread Xavier Noria
On Jul 25, 2005, at 11:15, [EMAIL PROTECTED] wrote: Hello, I've just made a simple script using xml::simple, and I am stuck on something: I have an xml file that looks like this: Somewhere 18 a Somewhere else 3 a bc So my question would be,

Re: xml::simple, $hash ?

2005-07-01 Thread Brent Clark
Grant McLean wrote: Perhaps instead of ... $xml->XMLout(\%fullXmlHash, ... .. you might be looking for: $xml->XMLout( { "agentName" => \%fullXmlHash} } , ... Ahh brilliant this is how it currently is 12:51:59 ZAR tbrink so im one step closer to gett

Re: xml::simple, $hash ?

2005-07-01 Thread Brent Clark
Grant McLean wrote: If I understand your question correctly, I think you need to use the RootName option. Hi Grant / list thanks for your reply. I actually need to agentABC to one less than the root. Therefore Im trying to get it as so.

Re: xml::simple, $hash ?

2005-06-30 Thread Wiggins d'Anconia
Brent Clark wrote: > Hi all > > I have a hash that I am trying to populate for XML::Simple > > $fullXmlHash{$agentBookingSearch."BookRef_".$xmlData{'bookref'}} = > \%xmlData; > > This work perfectly and I get the info as so > > > > 17:20:58 > etc > 100122 > > > 13:

Re: xml simple question

2005-04-15 Thread BJ
Thank you very much, I will look into xpath and xlst. :-) Chris Devers wrote: On Fri, 15 Apr 2005, BJ wrote: I am trying to write a script to aggregate diverse xml documents into tables. The trick is that i dont know the exact stucture of the xml files in advance. [] I basically want every

Re: xml simple question

2005-04-15 Thread Chris Devers
On Fri, 15 Apr 2005, BJ wrote: > I am trying to write a script to aggregate diverse xml documents into > tables. The trick is that i dont know the exact stucture of the xml > files in advance. [] I basically want every bit of data from every > node in Data. Any ideas on how to do that? I am

re xml::simple

2004-11-02 Thread E.Horn
thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: XML ::SIMPLE

2004-11-02 Thread Bob Showalter
E.Horn wrote: > Hey! Back for another bite at this apple I see... > Does the XML SIMPLE Modul work if i only want to get the content of > the text between the tags? Of course. Have you tried it? > I want to parse this xmlfile so that there is just CHINA,Hallo,27832 OK. > Or do i have to use t

Re: XML::Simple

2004-06-08 Thread Wiggins d Anconia
> Wig, > My Poor Mail client is very poor @ bottom post > Bummer, time to upgrade the mail client? ;-) > Any idea why it does not print exactly like it readslook @ attribute. In source file, it is almost on top, while in output it's nearly on bottom ?? > I suspect because the struct

Re: XML::Simple

2004-06-08 Thread mgoland
ia <[EMAIL PROTECTED]> Date: Monday, June 7, 2004 11:33 pm Subject: Re: XML::Simple > Please bottom post > > Mark Goland wrote: > > Wiggings, > > I should of been more clear. It does work, but does not > produce same > > output as input. My best gues

Re: XML::Simple

2004-06-07 Thread Wiggins d'Anconia
t of guess and test until it produces exactly what I want. Generally messing with ForceArray and KeyAttr has gotten me where I needed to go. You might re-examine the docs on these particular attributes. Helps? http://danconia.org - Original Message ----- From: "Wiggins d'Anconia&qu

Re: XML::Simple

2004-06-07 Thread Mark Goland
$XML::Simple::VERSION" 2.12 - Original Message - From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: "Mark Goland" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, June 07, 2004 10:25 PM Subject: Re: XML::Simple > Mark Goland wrote:

Re: XML::Simple

2004-06-07 Thread Wiggins d'Anconia
Mark Goland wrote: Hello all, I am trying to play with simple XML. I hace reated a file, and am trying to read it in using XML::Simple and write it out, but with no luck :O(. Can someone point me to the correct error. Thanks in Advance, Mark G CODE: #!PERl -w use XML::Simple; use Data::Dumper;