Re: Extracting value from data within an element.
- From: "Eric J. Roode" <sdn.girths00869@xxxxxxxxxxx>
- Date: Thu, 01 Dec 2005 06:12:26 -0600
"anthony" <anthony@xxxxxxxxxxxxxxxxx> wrote in news:1133357201.527867.31710
@g49g2000cwa.googlegroups.com:
[...]
> no problem. What I have encountered however, is that in one of my XML
> files, there is a piece of information that I would like to extract
> that is emebedded in the data. I am not sure if any of the options in
> XML::Parser or XML::Simple modules will allow me to do this. The
> element name and data of the XML file is shown below. What I would like
> to do is extract the number from this data.
>
> <desc>Sun(sm) Alert Notification 45707: Buffer overflow in
> vold(1M)</desc>
>
> next element:
>
> <desc>Sun(sm) Alert Notification 45240: he "/proc/[pid]/sigact" File
> May Contain Sensitive Data</desc>
>
> Anyone have any ways to do this?
That is not a function of XML parsing; that is a pattern-matching problem.
Extract the <desc> contents into a string, then use a regex on it.
--
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
.
- References:
- Extracting value from data within an element.
- From: anthony
- Extracting value from data within an element.
- Prev by Date: Re: Please help me on the following perl program
- Next by Date: Error while using LWP
- Previous by thread: Extracting value from data within an element.
- Next by thread: problem with Device::SerialPort
- Index(es):
Relevant Pages
|