Hi,
I need to extract the start time value (bold, red font) under the '<LogEvent ID="Timer Start">' tag (black bold) from a file with the following pattern. There are other LogEventIDs listed in the file as well, making it harder for me to extract out the specific start time that I need.
.
.... (7 Replies)
Hi Everyone, I have an sh script that I am working on and I have run into a little snag that I am hoping someone here can assist me with.
I am using wget to retrieve an xml file from thetvdb.com. This part works ok but what I need to be able to do is extract the series ID # from the xml and put... (10 Replies)
Hi All,
Requirement: remove start and end tag of parent element
<DummyLevel>
<level1> </level1>
<level2> </level2>
<level3> </level3>
<level4> </level4>
<level5> </level5>
<level6> </level7>
</DummyLevel>
I have to delete the first <dummylevel> and last </DummyLevel> tags from... (7 Replies)
Hello everyone,
Firstly i do not require alot of help.. i am right at the end of finishing my scipt but cannot find a solution to the last part.
What i need to do is, prompt the user for a file to work with, which i have done.
promt the user for an output file - which is done.
#!/bin/bash... (14 Replies)
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2.
Based on a post elsewhere, I found the code:
awk... (2 Replies)
Hi,
I have a log file (log.txt) that which contains lines of date/time.
I need to create a script to extract a CSV file (out.csv) that gets all the sequential times (with only 1 minute difference) together by stating the start time and end time of this period.
Sample log file (log.txt)
... (7 Replies)
I have a folder containing text files. I need to extract specific lines from the files of this folder based on another file input.txt. How can I do this with awk/sed?
file1
ARG 81.9 8 81.9 0
LEU 27.1 9 27.1 0
PHE .0 10 .0 0
ASP 59.8 11 59.8 0
ASN 27.6 12 27.6 0
ALA .0 13 .0 0... (5 Replies)
Hello Shell Gurus,
I have a requirement to get the specific tags from a XML file.
Here is my code snippet
<jdbc-system-resource>
<name>SDPData Source</name>
<target>AdminServer,osb_server1,soa_server1</target>
... (30 Replies)
Below are my custom period start and end dates based on a calender, these dates are placed in a file, for each period i need to split into three weeks for each period row, example is given below.
Could you please help out to achieve solution through shell script..
File content:
... (2 Replies)
Discussion started by: nani2019
2 Replies
LEARN ABOUT DEBIAN
xml::dom::valparser
XML::DOM::ValParser(3pm) User Contributed Perl Documentation XML::DOM::ValParser(3pm)NAME
XML::DOM::ValParser - an XML::DOM::Parser that validates at parse time
SYNOPSIS
use XML::DOM::ValParser;
my %expat_options = (KeepCDATA => 1,
Handlers => [ Unparsed => &my_Unparsed_handler ]);
my $parser = new XML::DOM::ValParser (%expat_options);
eval {
local $XML::Checker::FAIL = &my_fail;
my $doc = $parser->parsefile ("fail.xml");
... XML::DOM::Document was created sucessfully ...
};
if ($@) {
# Either XML::Parser (expat) threw an exception or my_fail() died.
... your error handling code here ...
# Note that the XML::DOM::Document is automatically disposed off and
# will be garbage collected
}
# Throws an exception (with die) when an error is encountered, this
# will stop the parsing process.
# Don't die if a warning or info message is encountered, just print a message.
sub my_fail {
my $code = shift;
die XML::Checker::error_string ($code, @_) if $code < 200;
XML::Checker::print_error ($code, @_);
}
DESCRIPTION
Use XML::DOM::ValParser wherever you would use XML::DOM::Parser and your XML will be checked using XML::Checker at parse time.
See XML::DOM for details on XML::DOM::Parser options. See XML::Checker for details on setting the fail handler (my_fail.)
The following handlers are currently supported, just like XML::DOM::Parser: Init, Final, Char, Start, End, Default, Doctype, CdataStart,
CdataEnd, XMLDecl, Entity, Notation, Proc, Default, Comment, Attlist, Element, Unparsed.
XML ::DOM::ValParser
XML::DOM::ValParser extends from XML::Checker::Parser. It creates an XML::Checker object and routes all event handlers through the checker,
before processing the events to create the XML::DOM::Document.
Just like XML::Checker::Parser, the checker object can be retrieved with the getChecker() method and can be reused later on (provided that
the DOCTYPE section of the XML::DOM::Document did not change in the mean time.)
You can control which errors are fatal (and therefore should stop creation of the XML::DOM::Document) by filtering the appropriate error
codes in the global $XML::Checker::FAIL handler (see "ERROR_HANDLING" in XML::Checker) and calling die or croak appropriately.
Just like XML::Checker::Parser, XML::DOM::ValParser supports the SkipExternalDTD and SkipInsignifWS options. See XML::Checker::Parser for
details.
AUTHOR
Enno Derksen is the original author.
Send bug reports, hints, tips, suggestions to T.J. Mather at <tjmather@tjmather.com>.
SEE ALSO
XML::DOM, XML::Checker ("SEE_ALSO" in XML::Checker)
perl v5.10.0 2001-08-26 XML::DOM::ValParser(3pm)