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
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
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
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
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
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
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
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
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
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";
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
: 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
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 $
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'
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
/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
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
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
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
From: Sharan Basappa
> I have a kind of user defined xml file where users enter their test
> information.
> I need to parse the xml file, get the relevant data and then use the
> test information to invoke
> low level scripts that run the tests. Is there a xml parser that can
> do this job?
> Als
On Wed, Apr 29, 2009 at 7:54 PM, Bruce Ferrell wrote:
> Have a look at XML::Simple
>
> I'm a lousy programmer and even I can use it :)
>
Thanks, Bruce. My requirements are really modest, so I think this
should be sufficient ...
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additi
Have a look at XML::Simple
I'm a lousy programmer and even I can use it :)
sanket vaidya wrote:
> Hi,
>
> Search for some XML modules on CPAN & get your job done by using appropriate
> module. I haven't used perl with XML So cannot tell you the exactly which
> module.
>
> Thanks,
> Sanket Vaidy
From: Sharan Basappa
> Also, I have heard a bit about xml schemas. Does the fact that I am
> using my own format
> of xml file make any difference?
Only if you actually need to formally validate your files against a
schema. In that case, you would need to create the schema and follow its
rules whe
Hi,
Search for some XML modules on CPAN & get your job done by using appropriate
module. I haven't used perl with XML So cannot tell you the exactly which
module.
Thanks,
Sanket Vaidya
-Original Message-
From: Sharan Basappa [mailto:sharan.basa...@gmail.com]
Sent: Wednesday, April 29, 2
To:
Cc: "Mike Blezien"
Sent: Tuesday, June 26, 2007 11:35 AM
Subject: Re: XML Parsing
> Mike Blezien wrote:
>> can this handle multiple elements with the same name? IE. the path used
>> above
>> may have more then one element within the
>> ... ...
- Original Message -
From: "Karjala" <[EMAIL PROTECTED]>
To:
Cc: "Mike Blezien" <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2007 11:35 AM
Subject: Re: XML Parsing
Mike Blezien wrote:
can this handle multiple elements with the same name? IE. the pat
Mike Blezien wrote:
can this handle multiple elements with the same name? IE. the path
used above may have more then one element within
the ... ...
Mike
It can, as follows:
my @message_objects =
$obj->path('response/idalertresponse/candidateresults/candidateactivity/messaging/ra
- Original Message -
From: "mirod" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, June 26, 2007 2:46 AM
Subject: Re: XML Parsing
On Jun 25, 3:47 am, [EMAIL PROTECTED] (Mike Blezien) wrote:
I need to parse a fairly largeXMLresponse file and would like some
suggestions
o
Karjala,
- Original Message -
From: "Karjala" <[EMAIL PROTECTED]>
To:
Cc: "Mike Blezien" <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2007 9:56 AM
Subject: Re: XML Parsing
You could use XML::MyXML for this job (works well), if you know the exact
po
From: "Mike Blezien" <[EMAIL PROTECTED]>
> I need to parse a fairly large XML response file and would like some
> suggestions
> on which XML module would work the best. We've been using the XML::Simple
> module, but I don't think that's the right one for the job. Below is the XML
> file we need
You could use XML::MyXML for this job (works well), if you know the
exact position in the XML tree where is located.
Say $xml holds your XML.
Then:
use XML::MyXML qw(:all);
$obj = &xml_to_object($xml)
$msg_obj =
$obj->path('response/idalertresponse/candidateresults/candidateactivit
- Original Message -
From: "mirod" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, June 26, 2007 2:46 AM
Subject: Re: XML Parsing
On Jun 25, 3:47 am, [EMAIL PROTECTED] (Mike Blezien) wrote:
I need to parse a fairly largeXMLresponse file and would like some
suggestions
o
XML::LibXML is also a good one for general xml parsing/manipulation.
-Original Message-
From: mirod [mailto:[EMAIL PROTECTED]
Sent: 26 June 2007 08:47
To: beginners@perl.org
Subject: Re: XML Parsing
On Jun 25, 3:47 am, [EMAIL PROTECTED] (Mike Blezien) wrote:
> I need to parse a fai
On Jun 25, 5:29 am, [EMAIL PROTECTED] (Prabu Ayyappan) wrote:
> Have you tried XML::XPath for this one.It may help you.
As far as I can tell, XML::XPath is not supported any more (look at
its RT list at
http://rt.cpan.org/Public/Dist/Display.html?Name=XML-XPath). If you
want to go
that route, use
On Jun 25, 3:47 am, [EMAIL PROTECTED] (Mike Blezien) wrote:
> I need to parse a fairly largeXMLresponse file and would like some suggestions
> on whichXMLmodule would work the best. We've been using theXML::Simple
> module, but I don't think that's the right one for the job. Below is theXML
> file
On 6/24/07, 吴小勇 <[EMAIL PROTECTED]> wrote:
XML::XPath? Something related with DRM(DIgital Rights Management)?
Not in the slightest. You may want to read this
http://search.cpan.org/~msergeant/XML-XPath-1.13/XPath.pm
XML::XPath? Something related with DRM(DIgital Rights Management)?
2007/6/25, Prabu Ayyappan <[EMAIL PROTECTED]>:
Hi,
Have you tried XML::XPath for this one.It may help you.
Thnx and Rgds,
[EMAIL PROTECTED]
Mike Blezien <[EMAIL PROTECTED]> wrote: I need to parse a fairly
large XML response f
Hi,
Have you tried XML::XPath for this one.It may help you.
Thnx and Rgds,
[EMAIL PROTECTED]
Mike Blezien <[EMAIL PROTECTED]> wrote: I need to parse a fairly large XML
response file and would like some suggestions
on which XML module would work the best. We've been using the XML::Simple
modul
On 03/29/2007 06:39 AM, Beginner wrote:
Hi,
I might be in above my head here so bear with me if I am not making
sense.
I have to retrieve and extract an xml fragment from a REST server. I
have followed some examples from the "Web Services" book. I am able
to retrieve the data via LWP::UserA
On 29 Mar 2007 at 12:39, Beginner wrote:
> Hi,
>
> I might be in above my head here so bear with me if I am not making
> sense.
>
> I have to retrieve and extract an xml fragment from a REST server. I
> have followed some examples from the "Web Services" book. I am able
> to retrieve the data
On 3/10/06, Graeme McLaren <[EMAIL PROTECTED]> wrote:
> I've checked my XML file and it contains:
> St. Patrick<92>s R.C. P.S.
>
> This is because St. Patrick's contains an apostrophe.
I'm guessing that where I see four characters "<92>", the actual file
has a single character. Some tools render
Hi all, I've worked out that the character is a type of apostrophe which has
a hex value of 92. How would I write my regex to substitute this character
for a normal apostrophe?
I've tried: s/92/'/g;
and it didn't work.
Any ideas?
From: "Graeme McLaren" <[EMAIL PROTECTED]>
To: beginners
On Thursday 28 October 2004 10:56, E.Horn wrote:
Good morning,
> this gives me a DTD as output.
DTD?
As in the kind of document that describes XML files?
If yes, an XML Parser might be the wrong tool for parsing this kind of file.
Could you give us an example?
> My problem is I want to parse th
I recently used XML::Simple for something very similar. You just tell it to read
your xml file and it'll parse it up and create a handy data structure to work with.
Use it with Data::Dumper if you want to see how it handles your xml:
#!/usr/local/bin/perl -w
use Data::Dumper;
44 matches
Mail list logo