|
Posted by Eric J. Roode on December 1, 2005, 6:12 am
Please log in for more thread options
@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
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$$,$/$:$;$~$*$%[$?]$.$~$*$$%[$?]$;$$"$^$~$*.>&$=`
|