gear::xmldom Namespace Reference

xml management methods. Work with the cElementTree module More...

Functions

def findChildByAttribute
 Get the child node with given attribute value.
def findAllChildByAttribute
 Get all children nodes with given attribute value.
def indent
 Pretty print for the cElementTree module.

Detailed Description

xml management methods. Work with the cElementTree module


This file is part of GEAR.

GEAR is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/lgpl.html>.

Author:     Jeremie Passerin      geerem@hotmail.com
Company:    Studio Nest (TM)
Date:       2010 / 11 / 15

Author:
Jeremie Passerin

Function Documentation

def gear::xmldom::findChildByAttribute (   elem,
  tag,
  attr,
  value 
)

Get the child node with given attribute value.


In cElementTree 1.3 we can use directly the path [='value']
but this is not the version available in Python 2.6.

Parameters:
elem etree.Element
tag String - Child element path.
attr String - Attribute name.
value String - Attribute value.
def gear::xmldom::findAllChildByAttribute (   elem,
  tag,
  attr,
  value 
)

Get all children nodes with given attribute value.


In cElementTree 1.3 we can use directly the path [='value']
but this is not the version available in Python 2.6.

Parameters:
elem etree.Element
tag String - Child element path.
attr String - Attribute name.
value String - Attribute value.
def gear::xmldom::indent (   elem,
  level = 0 
)

Pretty print for the cElementTree module.

Parameters:
elem etree.Element - Element to get with nice indentation.
level int - level of indentation.
Generated by  doxygen 1.6.2-20100208