com.github.restdriver.serverdriver
Class Xml

java.lang.Object
  extended by com.github.restdriver.serverdriver.Xml

public final class Xml
extends Object

Provides static helper methods for XML representations.

Author:
mjg

Method Summary
static Element asXml(String xml)
          Converts the given string to an XML element.
static String extractXPathValue(String expression, Element element)
          Extracts an XPath value from an XML element and returns the result as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

asXml

public static Element asXml(String xml)
Converts the given string to an XML element.

Parameters:
xml - The XML string to be converted
Returns:
The converted element

extractXPathValue

public static String extractXPathValue(String expression,
                                       Element element)
Extracts an XPath value from an XML element and returns the result as a string.

Parameters:
expression - The XPath expression to use for extraction
element - The element to use the XPath expression on
Returns:
The result of evaluating the XPath expression on the element


Copyright © 2011. All Rights Reserved.