Class DocParser
java.lang.Object
org.ampere.base.xml.DocParser
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildNodePath(Node node) static BooleangetBooleanAttribute(Node node, String valueName, boolean certified) get the boolean attribute associated to given attribute namegetChildByTag(Element parent, String tagName) static DoublegetDoubleAttribute(Node noeud, String nom) return the Double value associated to the attribute named 'nom' of the element 'noeud'.static ElementgetElement(Element element, int index, String tag) return the element number 'index' having tag 'tag'static ElementgetFirstElement(Node parent, String tagName) Get the first matching elementstatic IntegergetIntegerAttribute(Node noeud, String nom) return the Integer value associated to the attribute named 'nom' of the element 'noeud'.static NodegetNamedItem(Node noeud, String nom) return the node associated to the element named 'nom' belonging to Nodestatic ElementgetNextSiblingElement(Node node, String tagName) Get the next sibling (fr:fratrie) elementstatic StringgetNodeType(Node noeud) static DocParserstatic StringgetStringAttribute(Node node, String name, boolean certified) Get a string attributestatic ElementgetUniqueElement(Element element, String tag) return the first element having tag 'tag'static voidprintNodes(PrintStream out, Element node) print the list of nodes of an elementstatic BooleanreadBooleanAttribute(Node node, String valueName) Read a boolean attributestatic DoublereadDoubleAttribute(Node noeud, String nom) return the Double value associated to the attribute named 'nom' of the element 'noeud'.static IntegerreadIntegerAttribute(Node noeud, String nom) return the Integer value associated to the attribute named 'nom' of the element 'noeud'.static StringreadStringAttribute(Node noeud, String nom) return the string value associated to the attribute named 'nom' of the element 'noeud'.static voidtestNodeType(Node node)
-
Method Details
-
getSingleton
-
getNodeType
-
getElement
-
getUniqueElement
-
getNamedItem
-
readStringAttribute
-
buildNodePath
-
getStringAttribute
Get a string attribute- Parameters:
node- associated XML nodename- attribute namecertified- flag specifying that the attribute is required or not. If true, an exception occurs if the attribute is not defined- Returns:
- the string value associated to the attribute
-
readDoubleAttribute
-
getDoubleAttribute
return the Double value associated to the attribute named 'nom' of the element 'noeud'.- Throws:
PXDexception
-
readIntegerAttribute
-
getIntegerAttribute
return the Integer value associated to the attribute named 'nom' of the element 'noeud'.- Throws:
PXDexception
-
readBooleanAttribute
-
getBooleanAttribute
public static Boolean getBooleanAttribute(Node node, String valueName, boolean certified) throws PXDexception get the boolean attribute associated to given attribute name- Parameters:
node- associated nodevalueName- name of the attribute- Returns:
- the Boolean value associated to the attribute
- Throws:
PXDexception- if the string value do not fit the Boolean Format
-
printNodes
print the list of nodes of an element -
getChildByTag
-
getFirstElement
-
getNextSiblingElement
-
testNodeType
-