XML parsing
hi all,
i looking script can list out node, attributename, attrib value , nodevalue in tabular format out of sample xml below.
real xml file more complex below, dont want use xpath result parsing specific xml doc. need parse each node of xml file , pull out nodes either has attrib , attrib values or node having text. in below case out like. empty nodes should skipped 1 have data should output.
staff , branch=hanover ,standalone=yes
employee, id=1
name ,tobias weltner
.....
$xmldata = @'
<?xml version="1.0" standalone="yes"?>
<staff branch="hanover" type="sales">
<employee eid="1">
<name>tobias weltner</name>
<function>management</function>
<age>39</age>
</employee>
<employee eid="2">
<name>cofi heidecke</name>
<function>security</function>
<age>4</age>
</employee>
<employee eid="3">
<name>cofi heidecke</name>
<function>toptier</function>
<tierdown>
<reporting>35</reporting>
<departments>3</departments>
</tierdown>
<age>4</age>
</employee>
</staff>
'@
manish
it dint worked script, xsl.
thanks
manish
manish
Windows Server > Windows PowerShell
Comments
Post a Comment