We've been getting a lot of XML questions lately, and I suspect it's only going to get worsebetter ... Normal shell utilities just can't handle it and the "proper" solutions, do-everything perl modules or things like xmlstarlet, just make my head ache.
Started coding something tonight. What the mockup can do, right now:
I'm hoping to eventually make it a language to match and rearrange xml, with a built-in event loop sort of like awk's.
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)
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)
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)
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)
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)
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)
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)
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
xml::feed::entry
XML::Feed::Entry(3pm) User Contributed Perl Documentation XML::Feed::Entry(3pm)NAME
XML::Feed::Entry - Entry/item in a syndication feed
SYNOPSIS
## $feed is an XML::Feed object.
for my $entry ($feed->entries) {
print $entry->title, "
", $entry->summary, "
";
}
DESCRIPTION
XML::Feed::Entry represents an entry/item in an XML::Feed syndication feed.
USAGE
XML::Feed::Entry->new($format)
Creates a new XML::Feed::Entry object in the format $format, which should be either RSS or Atom.
$entry->convert($format)
Converts the XML::Feed::Entry object into the $format format, and returns the new object.
$entry->title([ $title ])
The title of the entry.
$entry->base([ $base ])
The url base of the entry.
$entry->link([ $uri ])
The permalink of the entry, in most cases, except in cases where it points instead to an offsite URI referenced in the entry.
$entry->content([ $content ])
An XML::Feed::Content object representing the full entry body, or as much as is available in the feed.
In RSS feeds, this method will look first for <http://purl.org/rss/1.0/modules/content/#encoded> and <http://www.w3.org/1999/xhtml#body>
elements, then fall back to a <description> element.
$entry->summary([ $summary ])
An XML::Feed::Content object representing a short summary of the entry. Possibly.
Since RSS feeds do not have the idea of a summary separate from the entry body, this may not always be what you want. If the entry contains
both a <description> element and another element typically used for the full content of the entry--either http://www.w3.org/1999/xhtml/body
or <http://purl.org/rss/1.0/modules/content/#encoded>--we treat that as the summary. Otherwise, we assume that there isn't a summary, and
return an XML::Feed::Content object with an empty string in the body.
$entry->category([ $category ])
The category in which the entry was posted.
Returns a list of categories if called in array context or the first category if called in scalar context.
WARNING It's possible this API might change to have an add_category instead.
$entry->tags([ $tag ])
A synonym (alias) for category;
$entry->author([ $author ])
The name or email address of the person who posted the entry.
$entry->id([ $id ])
The unique ID of the entry.
$entry->issued([ $issued ])
A DateTime object representing the date and time at which the entry was posted.
If present, $issued should be a DateTime object.
$entry->modified([ $modified ])
A DateTime object representing the last-modified date of the entry.
If present, $modified should be a DateTime object.
$entry->wrap
Take an entry in its native format and turn it into an XML::Feed::Entry object.
$entry->unwrap
Take an XML::Feed::Entry object and turn it into its native format.
AUTHOR & COPYRIGHT
Please see the XML::Feed manpage for author, copyright, and license information.
perl v5.14.2 2012-03-21 XML::Feed::Entry(3pm)