Sistema de Informações Gerenciais do Interlegis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
838 B

'''
Created on 02/05/2011
@author: sesostris
'''
import os
import sys
import xml.dom.minidom as minidom
fileName = "../listaCasas.rptdesign"
doc = minidom.parse(fileName)
parameterTags = doc.getElementsByTagName("parameters")
for parameterTag in parameterTags:
formFields = {}
for parameter in parameterTag.childNodes:
if parameter.nodeName != '#text':
formField = {}
for property in parameter.childNodes:
if property.nodeName != '#text':
formField[property.getAttribute('name').encode('ascii')] = property.childNodes[0].nodeValue
formFields[parameter.getAttribute('name').encode('ascii')] = formField
print formFields
for fieldName in formFields:
print fieldName, ':', formFields[fieldName]['valueType']