Class XMLUtilsParser
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.util.XMLUtilsParser
-
public final class XMLUtilsParser extends Object
The class define utility methods to extract information to a xml with the good type.- Since:
- 1.2
- Author:
- Sandrine Perrin
-
-
Constructor Summary
Constructors Constructor Description XMLUtilsParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Double
extractFirstValueToDouble(Document doc, String tagName)
static Double
extractFirstValueToDouble(Element e, String tagName)
static Integer
extractFirstValueToInt(Document doc, String tagName)
static Integer
extractFirstValueToInt(Element e, String tagName)
static String
extractFirstValueToString(Document doc, String tagName)
static String
extractFirstValueToString(Element e, String tagName)
static Double
extractValueToDouble(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.static Double
extractValueToDouble(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.static Integer
extractValueToInt(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.static Integer
extractValueToInt(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.static String
extractValueToString(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.static String
extractValueToString(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.
-
-
-
Method Detail
-
extractValueToInt
public static Integer extractValueToInt(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.- Parameters:
e
- root elementtagName
- tag name to extractindex
- value- Returns:
- value of tag
-
extractValueToDouble
public static Double extractValueToDouble(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.- Parameters:
e
- root elementtagName
- tag name to extractindex
- value- Returns:
- value of tag
-
extractFirstValueToDouble
public static Double extractFirstValueToDouble(Element e, String tagName)
-
extractValueToString
public static String extractValueToString(Element e, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the element.- Parameters:
e
- root elementtagName
- tag name to extractindex
- value- Returns:
- value of tag
-
extractFirstValueToString
public static String extractFirstValueToString(Element e, String tagName)
-
extractValueToInt
public static Integer extractValueToInt(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.- Parameters:
doc
- documenttagName
- tag name to extractindex
- value- Returns:
- value of tag
-
extractValueToDouble
public static Double extractValueToDouble(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.- Parameters:
doc
- documenttagName
- tag name to extractindex
- value- Returns:
- value of tag
-
extractFirstValueToDouble
public static Double extractFirstValueToDouble(Document doc, String tagName)
-
extractValueToString
public static String extractValueToString(Document doc, String tagName, int index)
Return the first value at a specific index corresponding to the tag name in the document.- Parameters:
doc
- documenttagName
- tag name to extractindex
- value- Returns:
- value of tag
-
-