Arenas has asked for the wisdom of the Perl Monks concerning the following question:
please how i can get singl node from URL?
I startet with:
?????#!/usr/bin/perl use strict; use warnings; use XML::Simple; my $filename = 'http://www.geocities.ws/arenas/xml/find.xml';
============================= # start with powershell $xt = [string] "#text" $xmlUrl = "http://www.geocities.ws/arenas/xml/find.xml" $xWeb = New-Object System.Net.WebClient $xWeb.Encoding = [System.Text.Encoding]::UTF8 $xxml = $xWeb.DownloadString($xmlUrl) $xa = ([xml]$xxml).selectNode("find/find/work[@type="eu"]"/a).$xt # -f = force $xa_1 = "{0:## ###.###}" -f ([int]$xa * 2) # or moor complex $xval # end # now save to html $xpath = "C:\studio\xml\val.html" $Create = [system.IO.File]::CreateText($xpath) <# or $Create = [System.IO.File]::Exists($xpath) #> $Create.WriteLine("<!DOCTYPE .... # end html $Create.Flush() $Create.close() clear-variable x* -scope global
Thanks for your help
@r
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Select Node
by poj (Abbot) on Feb 20, 2016 at 14:18 UTC | |
by Arenas (Novice) on Feb 20, 2016 at 15:22 UTC | |
by poj (Abbot) on Feb 20, 2016 at 15:43 UTC | |
by Arenas (Novice) on Feb 20, 2016 at 16:15 UTC | |
by poj (Abbot) on Feb 20, 2016 at 17:32 UTC |