Class XmlHelper
java.lang.Object
org.apache.struts2.config.providers.XmlHelper
XML utilities.
- Author:
- Mike
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetContent(Element element) This method will return the content of this particularelement.static IntegergetLoadOrder(Document doc) This method will find all the parameters under thisparamsElementand return them as Map<String, String>.
-
Constructor Details
-
XmlHelper
public XmlHelper()
-
-
Method Details
-
getParams
This method will find all the parameters under this
paramsElementand return them as Map<String, String>. For example,<result ... > <param name="param1">value1</param> <param name="param2">value2</param> <param name="param3">value3</param> </result>will returns a Map<String, String> with the following key, value pairs:
- param1 - value1
- param2 - value2
- param3 - value3
- Parameters:
paramsElement- params element- Returns:
- a map of key,value pairs
-
getContent
This method will return the content of this particular
element. For example,<result>something_1</result>When the
Element<result>is passed in as argument (elementto this method, it returns the content of it, namely,something_1in the example above.- Parameters:
element- the DOM element- Returns:
- content as string
-
getLoadOrder
- Parameters:
doc- document- Returns:
- the value of the "order" attribute from the root element
-