04-21-2011
Unless you need the complete document DOM in memory, a SAX (Sequential Access XML) parser will nearly always be faster. Whereas the DOM operates on the document as a whole, SAX parsers operate on each piece of the XML document sequentially. Even better would be StAX (Streaming API for XML) which is a newer API for pull-parsing of XML
Perl has several SAX modules but I do not see any StAX modules.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi ,
i'm searching for files over many Aix servers with rsh command using this request :
find /dir1 -name '*.' -exec ls {} \;
and then count them with "wc"
but i would improve this search because it's too long and replace directly find with ls command but "ls *. " doesn't work.
and... (3 Replies)
Discussion started by: Nicol
3 Replies
2. Shell Programming and Scripting
Hi All,
I am using grep command to find string "abc" in one file .
content of file is
***********
abc = xyz
def= lmn
************
i have given the below mentioned command to redirect the output to tmp file
grep abc file | sort -u | awk '{print #3}' > out_file
Then i am searching... (2 Replies)
Discussion started by: pooga17
2 Replies
3. UNIX for Dummies Questions & Answers
hi someone tell me which ways i can improve disk I/O and system process performance.kindly refer some commands so i can do it on my test machine.thanks, Mazhar (2 Replies)
Discussion started by: mazhar99
2 Replies
4. Shell Programming and Scripting
I have a data file of 2 gig
I need to do all these, but its taking hours, any where i can improve performance, thanks a lot
#!/usr/bin/ksh
echo TIMESTAMP="$(date +'_%y-%m-%d.%H-%M-%S')"
function showHelp {
cat << EOF >&2
syntax extreme.sh FILENAME
Specify filename to parse
EOF... (3 Replies)
Discussion started by: sirababu
3 Replies
5. Shell Programming and Scripting
Hi Friends,
I wrote the below shell script to generate a report on alert messages recieved on a day. But i for processing around 4500 lines (alerts) the script is taking aorund 30 minutes to process.
Please help me to make it faster and improve the performace of the script. i would be very... (10 Replies)
Discussion started by: apsprabhu
10 Replies
6. Shell Programming and Scripting
Hi All,
I have written a script as follows which is taking lot of time in executing/searching only 3500 records taken as input from one file in log file of 12 GB Approximately.
Working of script is read the csv file as an input having 2 arguments which are transaction_id,mobile_number and search... (6 Replies)
Discussion started by: poweroflinux
6 Replies
7. Programming
Input file:
#content_1
12314345345
242467
#content_14
436677645
576577657
#content_100
3425546
56
#content_12
243254546
1232454
.
.
Reference file:
content_100 (1 Reply)
Discussion started by: cpp_beginner
1 Replies
8. Programming
Hi,
Am pretty new for perl scripting and confused how to use XML Parser..
I just want to know how to use perl and XML parser..
The scenario is when i execute a command, it will generate a XML file..
From that XML file generated i need to grep for specific term that has HTML TAG say... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies
9. UNIX for Dummies Questions & Answers
Hi ,
i wrote a script to convert dates to the formate i want .it works fine but the conversion is tkaing lot of time . Can some one help me tweek this script
#!/bin/bash
file=$1
ofile=$2
cp $file $ofile
mydates=$(grep -Po '+/+/+' $ofile) # gets 8/1/13
mydates=$(echo "$mydates" | sort |... (5 Replies)
Discussion started by: vikatakavi
5 Replies
10. Programming
Hello,
Attached is my very simple C++ code to remove any substrings (DNA sequence) of each other, i.e. any redundant sequence is removed to get unique sequences. Similar to sort | uniq command except there is reverse-complementary for DNA sequence. The program runs well with small dataset, but... (11 Replies)
Discussion started by: yifangt
11 Replies
LEARN ABOUT DEBIAN
mkdoc::xml::decode
MKDoc::XML::Decode(3pm) User Contributed Perl Documentation MKDoc::XML::Decode(3pm)
NAME
MKDoc::XML::Decode - Expands XML entities
SYNOPSIS
use MKDoc::XML::Decode;
my $decode = new MKDoc::XML::Decode qw/xml xhtml numeric/;
# $xml is now "Chris' Baloon"
my $xml = MKDoc::XML::Decode->process ("Chris' Baloon");
SUMMARY
MKDoc::XML::Decode is a very simple module with pluggable entity decoding mechanism. At the moment there are three modules:
xml - Decodes ' " > < and & xhtml - Decodes XHTML entities such as é numeric - Decodes numeric entities
such as A
That's it.
This module and its counterpart MKDoc::XML::Encode are used by MKDoc::XML::Dumper to XML-encode and XML-decode litterals.
API
my $decode_object = new MKDoc::XML::Decode (@modules);
Constructs a new decode object using the modules specified in @modules.
my $decoded = $decode_object->decode ($stuff);
Decodes $stuff and returns it into $decoded.
Any entity which is not recognized will be returned as is but will trigger a warning.
AUTHOR
Copyright 2003 - MKDoc Holdings Ltd.
Author: Jean-Michel Hiver
This module is free software and is distributed under the same license as Perl itself. Use it at your own risk.
SEE ALSO
MKDoc::XML::Encode
perl v5.10.1 2004-10-06 MKDoc::XML::Decode(3pm)