Question : XML parsing with minidom

I rarely do python coding but am forced to make a modification to a program.  I simply want to read in an XML file and extract the value of the NumErrors tag.  Please see the example XML below.  I've attached the code that I'm trying to write to look through an XML file.  So far no luck.  I'm using pdb to step through but unfortunately, I'm unable to print the values of the different variables such as scan and info.  I don't know how to do this.  But if someone could please show me how to extract the NumErrors, I would be grateful.  The <Scan></Scan> blocks may appear numerous times inside the XML file.  Each Scan block will have one <Info></Info> block which contains NumErrors.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<Checker>
   <Scan>
      <Info Manu="Aero"
            ModelName="64F"
            NumErrors="0"
            ScanID="" />
   </Scan>
</Checker>

def getXmlTagValue( inXml ) :                                                                                  
     import xml.dom.minidom
     assert os.path.isfile(inXml)                                                                                 
     dom = xml.dom.minidom.parse(inXml)                                                                            
                                                                                                                   
     for scan in dom.getElementsByTagName('Scan'): 
         info = scan.getElementsByTagName('Info')                                                                  
         numErrors = info[0].firstChild.data                                                                       
         print "1"

Answer : XML parsing with minidom

if you have Excel Services, it's MOSS.

to tell for sure, you can look at Central Administration.  look for an SSP, or an ability to configure an SSP.  you won't have that in WSS.

or, look at the version number.
http://insomniacgeek.com/blog/how-to-determine-the-installed-sharepoint-version/
Random Solutions  
 
programming4us programming4us