In the case you mentioned, I'd prefer to see
I tried adding a few more entries to the example, namely Cabinet Temp - would also have the same fields as Coolant Temp. The real-life file has many Temp related entries that I'm interested in. I could use what is here now and use the xml_token function individually with multiple calls for each one, getting the last entry each. I was wondering if there would be a way to use a search string with multiple entries at the same time so it would return the last entry of each.
I know the subset that I’m interested in.
Another approach might be to take each <parameter> name and return the last instance of each. This help?
I'm data mining. Pulling data from site machines for analysis. There is too much to pull it all. I'm just choosing and picking
Last edited by harleyvrodred; 06-10-2017 at 12:55 AM..
Does anyone know of any tools that manage the rollout of patches across multiple types of Unix platform ( eg Solaris, Aix etc ).
I am looking for something that does a similiar job to SMS or WSUS in the Windows world (3 Replies)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hi all
I've been working on a bash script parsing through debug/trace files and extracting all lines that relate to some search string. So far, it works pretty well. However, I am challenged by one requirement that is still open.
What I want to do:
1) parse through a file and identify all... (3 Replies)
I need to find the MAC address of the ethernet cards on the host machine from the C language. I have found a way to do this on Linux using socket(), ioctl() and the ifreq structure. But this does not seem to work on AIX, HP/UX and probably the others I need (Solaris, SCO, Alpha etc).
Is there a... (7 Replies)
I got multple sql files.such as
>>vi abc.sql
select A.SITENAME,
NULL
NULL
A.CREATE_DTM
NULL
A.MODIFY_DTM
NULL
FROM ${STG_RET_ITEM} A INNER JOIN ${STG_INC_COMP} B ON (A.CUSTID=B.CUSTID)
LEFT OUTER JOIN ( select C.SITEID,SITESTATUS,MIN_EFF_DT,CURR_ST_DT,MAX_IN_DT,MAX_ACT_DT
from... (4 Replies)
Can somebody refer me following multicheck to perform across most of unix platform like AIX, HP-UX, solaris, Linux.
CPU utilization above X%
Check IO above X%
Swap usage check above X%
Memory utilization above X% ... (3 Replies)
Hi,
I have a string which can be completely unstructred. I am looking to parse out values within that String.
Here is an example
<Random Strings> String1=<some number a> String2=<some number b> String3=<some number c> Satish=<some number d> String4=<some number e>
I only want to parse out... (1 Reply)
from the CLI on a Mac, if you type networksetup -listallnetworkservices then you get results in a multi-line paragraph that look something like this:
networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
Wi-Fi
Display Ethernet
Bluetooth DUN... (7 Replies)
Discussion started by: hungryd
7 Replies
LEARN ABOUT SUSE
xml::parser::lite
XML::Parser::Lite(3) User Contributed Perl Documentation XML::Parser::Lite(3)NAME
XML::Parser::Lite - Lightweight regexp-based XML parser
SYNOPSIS
use XML::Parser::Lite;
$p1 = new XML::Parser::Lite;
$p1->setHandlers(
Start => sub { shift; print "start: @_
" },
Char => sub { shift; print "char: @_
" },
End => sub { shift; print "end: @_
" },
);
$p1->parse('<foo id="me">Hello World!</foo>');
$p2 = new XML::Parser::Lite
Handlers => {
Start => sub { shift; print "start: @_
" },
Char => sub { shift; print "char: @_
" },
End => sub { shift; print "end: @_
" },
}
;
$p2->parse('<foo id="me">Hello <bar>cruel</bar> World!</foo>');
DESCRIPTION
This Perl implements an XML parser with a interface similar to XML::Parser. Though not all callbacks are supported, you should be able to
use it in the same way you use XML::Parser. Due to using experimantal regexp features it'll work only on Perl 5.6 and above and may behave
differently on different platforms.
Note that you cannot use regular expressions or split in callbacks. This is due to a limitation of perl's regular expression implementation
(which is not re-entrant).
SUBROUTINES /METHODS
new
Constructor.
As (almost) all SOAP::Lite constructors, new() returns the object called on when called as object method. This means that the following
effectifely is a no-op if $obj is a object:
$obj = $obj->new();
New accepts a single named parameter, "Handlers" with a hash ref as value:
my $parser = XML::Parser::Lite->new(
Handlers => {
Start => sub { shift; print "start: @_
" },
Char => sub { shift; print "char: @_
" },
End => sub { shift; print "end: @_
" },
}
);
The handlers given will be passed to setHandlers.
setHandlers
Sets (or resets) the parsing handlers. Accepts a hash with the handler names and handler code references as parameters. Passing "undef"
instead of a code reference replaces the handler by a no-op.
The following handlers can be set:
Init
Start
Char
End
Final
All other handlers are ignored.
Calling setHandlers without parameters resets all handlers to no-ops.
parse
Parses the XML given. In contrast to XML::Parser's parse method, parse() only parses strings.
Handler methods
Init
Called before parsing starts. You should perform any necessary initializations in Init.
Start
Called at the start of each XML node. See XML::Parser for details.
Char
Called for each character sequence. May be called multiple times for the characters contained in an XML node (even for every single
character). Your implementation has to make sure that it captures all characters.
End
Called at the end of each XML node. See XML::Parser for details
Comment
See XML::Parser for details
XMLDecl
See XML::Parser for details
Doctype
See XML::Parser for details
Final
Called at the end of the parsing process. You should perform any neccessary cleanup here.
SEE ALSO
XML::Parser
COPYRIGHT
Copyright (C) 2000-2007 Paul Kulchenko. All rights reserved.
Copyright (C) 2008- Martin Kutter. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This parser is based on "shallow parser" http://www.cs.sfu.ca/~cameron/REX.html Copyright (c) 1998, Robert D. Cameron.
AUTHOR
Paul Kulchenko (paulclinger@yahoo.com)
Martin Kutter (martin.kutter@fen-net.de)
Additional handlers supplied by Adam Leggett.
perl v5.12.1 2010-03-18 XML::Parser::Lite(3)