Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: extracting attribute values which might have multiple occurences from xml file

by choroba (Abbot)
on Aug 20, 2013 at 09:28 UTC ( #1050166=note: print w/ replies, xml ) Need Help??


in reply to extracting attribute values which might have multiple occurences from xml file

Using XML::XSH2, a wrapper around XML::LibXML:

open file.xml ; my $count = 0 ; for //certDet { $count = $count + 1 ; echo :s Entry $count ':' ; echo :s 'DN="' xsh:subst(@subjectDN, ';', '&') '"' ; echo :s CN= xsh:match(@subjectDN, 'CN=(.*)') ; echo :s env= @env ; echo :s key= (key) ; }
The output is a bit different from what you posted:
2c2 < DN="/C=US/ST=NC/L=Raleigh/O=DotNet/OU=ET&D/CN=test1.xxxx.com" --- > DN="/C=US/ST=NC/L=Raleigh/O=DotNet/OU=ETD&D/CN=test1.xxxx.com" 9,10c9,10 < env=QA < key=1234 --- > env=dev > key=27166
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: extracting attribute values which might have multiple occurences from xml file
Select or Download Code
Re^2: extracting attribute values which might have multiple occurences from xml file
by tinkuPerlMonk2 (Initiate) on Aug 20, 2013 at 13:17 UTC
    Thanks you choroba for your input!!!!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1050166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-07-26 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls