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.
Your question makes a few assertions about your input i would like to verify before i start to suggest anything:
You imply that the values are not spanning several lines, which would be legal in XML:
Basically the two lines would be equivalent in XML, but maybe (?) not in your requirement.
Furthermore, what about blanks and other whitespace? is foo bar equivalent to foo bar?
Hi All,
I'm trying to extract the values for the 'src' and 'alt' tags within an xml file. In the files that I'm searching, the tags are always enclosed within an 'img' tag. Typically:
<img src="diwiz01.gif" width="576" height="254" alt="Out-of-process and In-process COM Objects"><bookmark... (3 Replies)
Hi All,
I am new to Unix I need a KSH script to get the values from XML file to write to a temp file.
Like the requirement is from the below TAG
<MAPPING DESCRIPTION ="Test Mapping" ISVALID ="YES" NAME ="m_test_xml" OBJECTVERSION ="1" VERSIONNUMBER ="1">
I need the MAPPING DESCRIPTION... (3 Replies)
Hi All,
Find the following code:
<Universal>D38x82j1JJ
</Universal>
I want to retrieve the value of <Universal> tag as below:
Please help me. (3 Replies)
Find out values between xml tag
.......
ABC><name></ABC><xyz>test</xyz>..here some other tag... <ABC><NUMBER></ABC><xyz>12345</xyz>....
.......
I want to take between bewtween ABC><NUMBER></ABC><xyz> to </xyz> that is 12345 (3 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)
Hi All,
I am working with a XML file.
Below is part for the file.
<Emp:Profile>
<Emp:Description>Admin</Emp:Description>
<Emp:Id>12347</Emp:Id>
</Emp:Profile>
<Emp:Profile>
... (7 Replies)
Hi All,
I'm new to sed.
In following XML file
<interface type='direct'>
<mac address='52:54:00:86:ce:f6'/>
<source dev='eno1' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
... (8 Replies)
Greetings all,
I have an XML file that is being generated from my application, here is a sample of the first tag (That I am trying to remove and display in a list..)
Example-
<tag one= "data" data="1234" updateTime="1300">
<tag one= "data1" data="1234" updateTime="1300">
<tag... (5 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)
Discussion started by: pchang
19 Replies
LEARN ABOUT DEBIAN
mojo::parameters
Mojo::Parameters(3pm) User Contributed Perl Documentation Mojo::Parameters(3pm)NAME
Mojo::Parameters - Parameter container
SYNOPSIS
use Mojo::Parameters;
my $p = Mojo::Parameters->new(foo => 'bar', baz => 23);
DESCRIPTION
Mojo::Parameters is a container for form parameters.
ATTRIBUTES
Mojo::Parameters implements the following attributes.
"charset"
my $charset = $p->charset;
$p = $p->charset('UTF-8');
Charset used for decoding parameters, defaults to "UTF-8".
"pair_separator"
my $separator = $p->pair_separator;
$p = $p->pair_separator(';');
Separator for parameter pairs, defaults to "&".
METHODS
Mojo::Parameters inherits all methods from Mojo::Base and implements the following new ones.
"new"
my $p = Mojo::Parameters->new;
my $p = Mojo::Parameters->new('foo=b%3Bar&baz=23');
my $p = Mojo::Parameters->new(foo => 'b;ar');
my $p = Mojo::Parameters->new(foo => ['ba;r', 'b;az']);
my $p = Mojo::Parameters->new(foo => ['ba;r', 'b;az'], bar => 23);
Construct a new Mojo::Parameters object.
"append"
$p = $p->append(foo => 'ba;r');
$p = $p->append(foo => ['ba;r', 'b;az']);
$p = $p->append(foo => ['ba;r', 'b;az'], bar => 23);
Append parameters.
# "foo=bar&foo=baz"
Mojo::Parameters->new('foo=bar')->append(foo => 'baz');
# "foo=bar&foo=baz&foo=yada"
Mojo::Parameters->new('foo=bar')->append(foo => ['baz', 'yada']);
# "foo=bar&foo=baz&foo=yada&bar=23"
Mojo::Parameters->new('foo=bar')->append(foo => ['baz', 'yada'], bar => 23);
"clone"
my $p2 = $p->clone;
Clone parameters.
"merge"
$p = $p->merge(Mojo::Parameters->new(foo => 'b;ar', baz => 23));
Merge parameters.
"param"
my @names = $p->param;
my $foo = $p->param('foo');
my @foo = $p->param('foo');
my $foo = $p->param(foo => 'ba;r');
my @foo = $p->param(foo => qw(ba;r ba;z));
Check and replace parameter values.
"params"
my $params = $p->params;
$p = $p->params([foo => 'b;ar', baz => 23]);
Parsed parameters.
"parse"
$p = $p->parse('foo=b%3Bar&baz=23');
Parse parameters.
"remove"
$p = $p->remove('foo');
Remove parameters.
# "bar=yada"
Mojo::Parameters->new('foo=bar&foo=baz&bar=yada')->remove('foo');
"to_hash"
my $hash = $p->to_hash;
Turn parameters into a hash reference.
# "baz"
Mojo::Parameters->new('foo=bar&foo=baz')->to_hash->{foo}[1];
"to_string"
my $string = $p->to_string;
Turn parameters into a string.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Parameters(3pm)