You did not post your last modified code.
split will consume that part that matches as you found out, except if you use a lookahead or lookbehind. I use that technique on this code.
I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Hi,
I need to split xml-files with sizes greater than 2 gb into smaler chunks. As I dont want to end up with billions of files, I want those splitted files to have configurable sizes like 250 MB. Each file should be well formed having an exact copy of the header (and footer as the closing of the... (0 Replies)
hi all
i have a some huge html files (500MB to 1GB). Each file has multiple
<html></html> tags
<html>
.................
....................
....................
</html>
<html>
.................
....................
....................
</html>
<html>
.................... (5 Replies)
To split the files
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Test.xml
---------
<?xml version="UTF_8">
<emp: ....>
<name>a</name>
<age>10</age>
</emp>
<?xml version="UTF_8">
<emp: ....>
<name>b</name>
<age>10</age>... (11 Replies)
HI All,
I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz.
eg:
<?xml version="1.0"?>... (4 Replies)
Hi ,
I have a XML file like below
file name : sample.xml
<?xml version="1.0"?>
<catalog>
<author>Rajini</author>
<title>XML Guide</title>
<Text> </Text>
<genre>Computer</genre>
<price>44.95</price>
</catalog>
<?xml version="1.0"?>
<catalog>
... (5 Replies)
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix.
eg :
<?xml version="1.0" encoding="UTF-8"?>
<ml:individual... (3 Replies)
I have a text file that looks like this:
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
FIELD1, FIELD2, THIS IS FIELD3, FIELD4
I need it to turn it into an XML file to run against a custom application. My ultimate goal is for it to look like... (15 Replies)
Hello Shell Guru's
I have a requirement to split the source xml file into three different text file.
And i need your valuable suggestion to finish this.
Here is my source xml snippet, here i am using only one entry of <jms-system-resource>. There may be multiple entries in the source file.
... (5 Replies)
Hello Gurus,
I have a requirement to split the xml file into different xml files.
Can you please help me with that?
Here is my Source XML file
<jms-system-resource>
<name>PS6SOAJMSModule</name>
<target>soa_server1</target>
<sub-deployment>
... (3 Replies)
Discussion started by: Siv51427882
3 Replies
LEARN ABOUT DEBIAN
javascript::packer
JavaScript::Packer(3pm) User Contributed Perl Documentation JavaScript::Packer(3pm)NAME
JavaScript::Packer - Perl version of Dean Edwards' Packer.js
VERSION
Version 1.006003
DESCRIPTION
A JavaScript Compressor
This module is an adaptation of Dean Edwards' Packer.js.
Additional information: http://dean.edwards.name/packer/
SYNOPSIS
use JavaScript::Packer;
my $packer = JavaScript::Packer->init();
$packer->minify( $javascript, $opts );
To return a scalar without changing the input simply use (e.g. example 2):
my $ret = $packer->minify( $javascript, $opts );
For backward compatibility it is still possible to call 'minify' as a function:
JavaScript::Packer::minify( $javascript, $opts );
The first argument must be a scalarref of javascript-code.
Second argument must be a hashref of options. Possible options are:
compress
Defines compression level. Possible values are 'clean', 'shrink', 'obfuscate' and 'best'. Default value is 'clean'. 'best' uses
'shrink' or 'obfuscate' depending on which result is shorter. This is recommended because especially when compressing short scripts the
result will exceed the input if compression level is 'obfuscate'.
copyright
You can add a copyright notice at the top of the script.
remove_copyright
If there is a copyright notice in a comment it will only be removed if this option is set to a true value. Otherwise the first comment
that contains the word "copyright" will be added at the top of the packed script. A copyright comment will be overwritten by a
copyright notice defined with the copyright option.
no_compress_comment
If not set to a true value it is allowed to set a JavaScript comment that prevents the input being packed or defines a compression
level.
/* JavaScript::Packer _no_compress_ */
/* JavaScript::Packer shrink */
EXAMPLES
Example 1
Common usage.
#!/usr/bin/perl
use strict;
use warnings;
use JavaScript::Packer;
my $packer = JavaScript::Packer->init();
open( UNCOMPRESSED, 'uncompressed.js' );
open( COMPRESSED, '>compressed.js' );
my $js = join( '', <UNCOMPRESSED> );
$packer->minify( $js, { compress => 'best' } );
print COMPRESSED $js;
close(UNCOMPRESSED);
close(COMPRESSED);
Example 2
A scalar is requested by the context. The input will remain unchanged.
#!/usr/bin/perl
use strict;
use warnings;
use JavaScript::Packer;
my $packer = JavaScript::Packer->init();
open( UNCOMPRESSED, 'uncompressed.js' );
open( COMPRESSED, '>compressed.js' );
my $uncompressed = join( '', <UNCOMPRESSED> );
my $compressed = $packer->minify( $uncompressed, { compress => 'best' } );
print COMPRESSED $compressed;
close(UNCOMPRESSED);
close(COMPRESSED);
AUTHOR
Merten Falk, "<nevesenin at cpan.org>"
BUGS
Please report any bugs or feature requests through the web interface at http://github.com/nevesenin/javascript-packer-perl/issues
<http://github.com/nevesenin/javascript-packer-perl/issues>.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc JavaScript::Packer
COPYRIGHT & LICENSE
Copyright 2008 - 2012 Merten Falk, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-02 JavaScript::Packer(3pm)