Sorry to trouble you guys again.....but i encounter this problem:
My textfile contains this:
2006-01-12 01:12:08,290 INFO - The XML message **************<PM_ARRIVAL xmlns:xsi=
"http://www.w3.org/2001/XMLSchemainstance"><system_c>GMS</system_c><trans_c>ARLC</trans_c></<PM_ARRIVAL>
2006-01-12... (8 Replies)
Hi Guyz,
I have an XML message in following format:
I want my contents to be formatted in following order:
i.e. I want a newline after every XML tag end.
How to do this?
Thnx in advance. (5 Replies)
Hi,
I am newbie. I wanted to know how to find the end tag in shell where I have multiple tags in xml like
<tag name="x" version="1.0">
</tag>
<tag name="x" version="1.0">
</tag>
<tag name="x" version="1.0">
</tag>
And I wanted to update depends this xml as (in side the tag <subtag ... (10 Replies)
Hi,
I have the following code in my xml file:
<aaaRule loginIdPattern=".*"
orgIdPattern=".*" deny="false" />
<aaaRuleGroup name="dpaas">
<aaaRule loginIdPattern=".*" orgIdPattern=".*"
deny="false" />
I want to retrieve orgIdPattern and loginIdPattern parameter value based on... (2 Replies)
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
I want to print from <fruits> to </fruits> tag which have <fruit> as mango. Also i want both <fruits> and </fruits> in output. Please help
eg.
<fruits>
<fruit id="111">mango<fruit>
.
another 20 lines
.
</fruits> (3 Replies)
Hi Guys
Here is my Input :
<?xml version="1.0" encoding="UTF-8"?>
<xn:MeContext id="01736">
<xn:VsDataContainer id="01736">
<xn:attributes>
<xn:vsDataType>vsDataMeContext</xn:vsDataType>
... (12 Replies)
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Hi Forum.
I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script.
Any feedback will be greatly appreciated.
... (19 Replies)
I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file:
<EMAIL>***</EMAIL>
<CUSTOMER_ID>****</CUSTOMER_ID>
<BRANDID>***</BRANDID>
Now I want to grep the values of all these specified... (1 Reply)
Discussion started by: shubh752
1 Replies
LEARN ABOUT SUSE
xml::parser::style::stream
Parser::Style::Stream(3) User Contributed Perl Documentation Parser::Style::Stream(3)NAME
XML::Parser::Style::Stream - Stream style for XML::Parser
SYNOPSIS
use XML::Parser;
my $p = XML::Parser->new(Style => 'Stream', Pkg => 'MySubs');
$p->parsefile('foo.xml');
{
package MySubs;
sub StartTag {
my ($e, $name) = @_;
# do something with start tags
}
sub EndTag {
my ($e, $name) = @_;
# do something with end tags
}
sub Characters {
my ($e, $data) = @_;
# do something with text nodes
}
}
DESCRIPTION
This style uses the Pkg option to find subs in a given package to call for each event. If none of the subs that this style looks for is
there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the
subs receive as their 1st parameter the Expat instance for the document they're parsing.
It looks for the following routines:
o StartDocument
Called at the start of the parse .
o StartTag
Called for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_
variable will contain attribute values supplied for that element.
o EndTag
Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.
o Text
Called just before start or end tags with accumulated non-markup text in the $_ variable.
o PI
Called for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd
parameters respectively.
o EndDocument
Called at conclusion of the parse.
perl v5.12.1 2003-07-27 Parser::Style::Stream(3)