Package org.apache.tika.util
Class XMLDOMUtil
- java.lang.Object
- 
- org.apache.tika.util.XMLDOMUtil
 
- 
 public class XMLDOMUtil extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description XMLDOMUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetInt(String attrName, Map<String,String> runtimeAttributes, Node docElement)Get an int value.static longgetLong(String attrName, Map<String,String> runtimeAttributes, Node docElement)Get a long value.static Map<String,String>mapifyAttrs(Node node, Map<String,String> overwrite)This grabs the attributes from a dom node and overwrites those values with those specified by the overwrite map.
 
- 
- 
- 
Method Detail- 
mapifyAttrspublic static Map<String,String> mapifyAttrs(Node node, Map<String,String> overwrite) This grabs the attributes from a dom node and overwrites those values with those specified by the overwrite map.- Parameters:
- node- node for building
- overwrite- map of attributes to overwrite
- Returns:
- map of attributes
 
 - 
getIntpublic static int getInt(String attrName, Map<String,String> runtimeAttributes, Node docElement) Get an int value. Try the runtime attributes first and then back off to the document element. Throw a RuntimeException if the attribute is not found or if the value is not parseable as an int.- Parameters:
- attrName- attribute name to find
- runtimeAttributes- runtime attributes
- docElement- correct element that should have specified attribute
- Returns:
- specified int value
 
 - 
getLongpublic static long getLong(String attrName, Map<String,String> runtimeAttributes, Node docElement) Get a long value. Try the runtime attributes first and then back off to the document element. Throw a RuntimeException if the attribute is not found or if the value is not parseable as a long.- Parameters:
- attrName- attribute name to find
- runtimeAttributes- runtime attributes
- docElement- correct element that should have specified attribute
- Returns:
- specified long value
 
 
- 
 
-