Package com.microstrategy.utils.xml
Interface AttributesXt
-
- All Superinterfaces:
org.xml.sax.Attributes
public interface AttributesXt extends org.xml.sax.Attributes
This interface is a wrapper aroundAttributes
, adding helper methods to cast attribute values to various data types.- Since:
- MicroStrategy Web 8.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.xml.sax.Attributes
getAttrs()
boolean
getBoolValue(java.lang.String name)
boolean
getBoolValue(java.lang.String name, boolean defaultVal)
int
getIntValue(java.lang.String name)
int
getIntValue(java.lang.String name, int defaultVal)
java.util.OptionalInt
getOptionalIntValue(java.lang.String name)
Returns the OptionalInt value of the attributejava.lang.String
getStrValue(java.lang.String name)
java.lang.String
getStrValue(java.lang.String name, java.lang.String defaultVal)
java.lang.String
getTag()
-
-
-
Method Detail
-
getStrValue
java.lang.String getStrValue(java.lang.String name) throws SAXSupportException
- Throws:
SAXSupportException
-
getStrValue
java.lang.String getStrValue(java.lang.String name, java.lang.String defaultVal)
-
getIntValue
int getIntValue(java.lang.String name) throws SAXSupportException
- Throws:
SAXSupportException
-
getIntValue
int getIntValue(java.lang.String name, int defaultVal) throws SAXSupportException
- Throws:
SAXSupportException
-
getOptionalIntValue
java.util.OptionalInt getOptionalIntValue(java.lang.String name) throws SAXSupportException
Returns the OptionalInt value of the attribute- Parameters:
name
- the name of XML node attribute- Returns:
- the attribute value, empty if the attribute doesn't exist The OptionalInt type is set for backward compatibility. That is, when the user uses an old iServer version, the XML response doesn't contain this attribute. We want the returned value here also reflects that. If we return an int value, the user couldn't know whether it's the value from the XML response, or the default value provided by WebSDK.
- Throws:
SAXSupportException
-
getBoolValue
boolean getBoolValue(java.lang.String name) throws SAXSupportException
- Throws:
SAXSupportException
-
getBoolValue
boolean getBoolValue(java.lang.String name, boolean defaultVal) throws SAXSupportException
- Throws:
SAXSupportException
-
getAttrs
org.xml.sax.Attributes getAttrs()
-
getTag
java.lang.String getTag()
-
-