|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javalid.core.support.XMLSupport
public class XMLSupport
This class provides some support for loading xml files.
| Method Summary | |
|---|---|
static java.lang.String |
getAttributeValue(org.w3c.dom.NamedNodeMap map,
java.lang.String attributeName,
boolean required,
java.lang.String defaultValue)
Method to get a value from an attribute, returns null if not found. |
static org.w3c.dom.Document |
loadDocument(java.lang.String fileName)
Tries to load given filename using getClass().getResource(..). |
static org.w3c.dom.Document |
loadDocument(java.net.URL url)
Attempts to load given url. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final org.w3c.dom.Document loadDocument(java.lang.String fileName)
fileName - The filename (full path) to load
JavalidException - If loading of file failspublic static final org.w3c.dom.Document loadDocument(java.net.URL url)
url - The url to load the xml document from
public static final java.lang.String getAttributeValue(org.w3c.dom.NamedNodeMap map,
java.lang.String attributeName,
boolean required,
java.lang.String defaultValue)
map - The map to useattributeName - The attributeName to lookup in the mapdefaultValue - Set if return value would be null, can be left null if you really want null returnedrequired - Set to true if the method must return a value, raises JvException if attribute would return null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||