com.opensymphony.xwork2.config.providers

## Class XmlHelper

- java.lang.Object
- - com.opensymphony.xwork2.config.providers.XmlHelper

-     public class XmlHelper
      extends Object

  XML utilities.
  Author:
    Mike

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlHelper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getContent(Element element)` This method will return the content of this particular `element`.
    `static Integer` | `getLoadOrder(Document doc)`
    `static Map<String,String>` | `getParams(Element paramsElement)` This method will find all the parameters under this `paramsElement` and return them as Map<String, String>.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XmlHelper

          public XmlHelper()

  - ### Method Detail

    - #### getParams

          public static Map<String,String> getParams(Element paramsElement)

      This method will find all the parameters under this `paramsElement` and 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

          public static String getContent(Element element)

      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 (`element` to this method, it returns the content of it, namely, `something_1` in the example above.

      Parameters:
        `element` - the DOM element
      Returns:
        content as string

    - #### getLoadOrder

          public static Integer getLoadOrder(Document doc)

      Parameters:
        `doc` - document
      Returns:
        the value of the "order" attribute from the root element

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.