10-21-2011
I'm trying to build a simple XML-manipulation tool. Very simple -- no DTD -- possibly not even validating.
The point is to easily match and extract and rearrange tags from inside nested context. "item.title" there extracts <title> tags and any contents in them, only when found directly inside <item> tags. You could do "^html.head.title" to extract title attributes from webpages, "table" to extract anything inside tables, and maybe "tag:key=value" to match tags where key='value' and anything inside.
I'm still thinking on how exactly to work the syntax but hope this explains the idea.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I have the following which is part of a larger interactive script for adding virtual hosts to Apache's configuration (it was built for non-technical administrators). I'm curious as to whether there is a simpler way of achieving the same thing. All it does is look into the... (3 Replies)
Discussion started by: mlott
3 Replies
2. Programming
my $branch_email_e = $FORM{r_Branch};
my $hostbranch_email_e = $FORM{r_Host_Branch};
my $branch_email_f = $FORM{r_Direction_generale};
my $hostbranch_email_f = $FORM{r_Direction_generale_daccueil};
my $branch_realname_e = '';
my $branch_realname_f = '';
... (4 Replies)
Discussion started by: callyvan
4 Replies
3. Shell Programming and Scripting
I'm trying to only read price (FLOAT (i.e 1.10, 3.14, etc etc))
If the input is just an integer, I will add a .00 behind. (i.e 3 becomes 3.00 , 20 becomes 20.00)
If the input is without 2 decimal places, I'll add a 0. (i.e 3.1 becomes 3.10)
I tried using the below code, it works but I don't... (6 Replies)
Discussion started by: andylbh
6 Replies
4. Shell Programming and Scripting
Hello,
I have a script that checks every file with a specific extension in a specific directory. The file names contain some numerical output and I am recording the file names with the best n outcomes.
The script finds all files in the directory with the extension .out.txt and uses awk to... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
5. UNIX for Dummies Questions & Answers
I have created this program to get the next month and year. Is there a simpler way.
#!/bin/ksh
string=`cat Date.txt`
year=`echo $string | cut -c 1-4`
month=`echo $string | cut -c 5-6`
echo $year$month
mon=`expr $month + 1`
if ; then
mon=0$mon
echo $mon
fi
if ; then
month=01
... (2 Replies)
Discussion started by: w020637
2 Replies
6. Shell Programming and Scripting
Hi All,
I am using SSH Tectia terminal to get the disk space utilization of a particular folder /opt/logs in all the servers one by one using the command df -h and looking through the list of folders manually to get /opt/logs folder disk space used percentage .
The problem here is , it... (2 Replies)
Discussion started by: aakhan2011
2 Replies
7. Shell Programming and Scripting
Hi all,
I am trying to grep a file with the word grand and get all the fields.. Then replace multiple spaces with single space and then get 8 th field and add all these numbers . I am able to do it but with so amny commands which i feel can be done in a simpler way
Please let me know if... (4 Replies)
Discussion started by: Hypesslearner
4 Replies
8. Shell Programming and Scripting
The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number
&& echo "Day before tomorrow"Can it be used within crontab? As
* * 28-31 * * && echo "Today ls last day of month" >>/tmp/crontabtestI tried to test crontab with... (1 Reply)
Discussion started by: lsatenstein
1 Replies
LEARN ABOUT DEBIAN
mojomojo::controller::gallery
MojoMojo::Controller::Gallery(3pm) User Contributed Perl Documentation MojoMojo::Controller::Gallery(3pm)
NAME
MojoMojo::Controller::Gallery - Page gallery.
SYNOPSIS
See MojoMojo
DESCRIPTION
Controller for page photo galleries.
METHODS
default
Private action to return a 404 not found page.
gallery ( .gallery )
Show a gallery page for the current node.
by_tag ( .gallery/by_tag )
Show a gallery by a given tag. Will also show photos in the descendants of the page with the given tag.
photo ( .photo/<id> )
Show a gallery photo page.
( /photo_by_tag/<id> )
Show a picture in tag gallery.
submittag ( /gallery/submittag )
Add a tag through form submit.
tag ( /.jsrpc/tag )
Add a tag to a page. Forwards to inline_tags.
untag ( .gallery/untag )
Remove a tag from a page. Forwards to inline_tags.
inline_tags ( .gallery/tags )
Make a list of the user's tags and popular tags, or just popular tags if no user is logged in.
description ( .gallery/description )
AJAX method for updating picture descriptions inline.
title ( .gallery/title )
AJAX method for updating picture titles inline.
AUTHOR
Marcus Ramberg <mramberg@cpan.org>
LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-07-20 MojoMojo::Controller::Gallery(3pm)