Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.eviware.soapui.support.xml
Class XmlUtils

    java.lang.Object
      com.eviware.soapui.support.xml.XmlUtils

    public final class XmlUtils

extends java.lang.Object

General XML-related utilities

Nested Class Summary
`static class` | `XmlUtils.XPathData`

Constructor Summary
`XmlUtils()`

Method Summary
`static org.w3c.dom.Element` | `addChildElement(org.w3c.dom.Element element, java.lang.String name, java.lang.String text)`
`static org.w3c.dom.Node` | `createNodeFromPath(org.w3c.dom.Element modelElement, java.lang.String path)`
`static java.lang.String` | `createXPath(org.w3c.dom.Node node)`
`static java.lang.String` | `createXPath(org.w3c.dom.Node node, boolean anonymous, boolean selectText, XPathModifier modifier)`
`static XmlUtils.XPathData` | `createXPathData(org.w3c.dom.Node node)`
`static XmlUtils.XPathData` | `createXPathData(org.w3c.dom.Node node, boolean anonymous, boolean selectText)`
`static java.lang.String` | `declareXPathNamespaces(java.lang.String xmlString)`
`static java.lang.String` | `declareXPathNamespaces(WsdlInterface iface)`
`static java.lang.String` | `declareXPathNamespaces(org.apache.xmlbeans.XmlObject xmlObject)`
`static void` | `dumpParserErrors(org.apache.xmlbeans.XmlObject xmlObject)`
`static java.lang.String` | `entitize(java.lang.String xml)`
`static java.lang.String` | `extractNamespaces(java.lang.String xpath)`
`static org.w3c.dom.NodeList` | `getChildElements(org.w3c.dom.Element elm)`
`static org.w3c.dom.NodeList` | `getChildElementsByTagName(org.w3c.dom.Element elm, java.lang.String name)`
`static org.w3c.dom.NodeList` | `getChildElementsByTagNameNS(org.w3c.dom.Element elm, java.lang.String namespaceUri, java.lang.String localName)`
`static java.lang.String` | `getChildElementText(org.w3c.dom.Element elm, java.lang.String name)`
`static java.lang.String` | `getChildElementText(org.w3c.dom.Element elm, java.lang.String name, java.lang.String defaultValue)`
`static int` | `getElementIndex(org.w3c.dom.Node element)` Gets the index of the specified element amongst elements with the same name
`static java.lang.String` | `getElementPath(org.w3c.dom.Element element)` Returns absolute xpath for specified element, ignores namespaces
`static java.lang.String` | `getElementText(org.w3c.dom.Element elm)`
`static org.w3c.dom.Element` | `getFirstChildElement(org.w3c.dom.Element elm)`
`static org.w3c.dom.Element` | `getFirstChildElement(org.w3c.dom.Element elm, java.lang.String name)`
`static org.w3c.dom.Element` | `getFirstChildElementNS(org.w3c.dom.Element elm, java.lang.String tns, java.lang.String localName)`
`static java.lang.String` | `getFragmentText(org.w3c.dom.DocumentFragment elm)`
`static java.lang.String` | `getNodeValue(org.w3c.dom.Node node)`
`static javax.xml.namespace.QName` | `getQName(org.w3c.dom.Node node)`
`static org.w3c.dom.Document` | `parse(org.xml.sax.InputSource inputSource)`
`static org.w3c.dom.Document` | `parse(java.io.InputStream in)`
`static org.w3c.dom.Document` | `parse(java.lang.String fileName)`
`static org.w3c.dom.Document` | `parseXml(java.lang.String xmlString)`
`static java.lang.String` | `prettyPrintXml(java.lang.String xml)`
`static java.lang.String` | `prettyPrintXml(org.apache.xmlbeans.XmlObject xml)`
`static java.lang.String` | `removeUnneccessaryNamespaces(java.lang.String xml)`
`static java.lang.String` | `removeXPathNamespaceDeclarations(java.lang.String xpath)`
`static boolean` | `seemsToBeXml(java.lang.String str)`
`static void` | `serialize(org.w3c.dom.Document dom, java.io.Writer writer)`
`static void` | `serialize(org.w3c.dom.Element elm, java.io.Writer writer)`
`static void` | `serializePretty(org.w3c.dom.Document document)`
`static void` | `serializePretty(org.w3c.dom.Document dom, java.io.Writer writer)`
`static void` | `serializePretty(org.apache.xmlbeans.XmlObject xmlObject, java.io.Writer writer)`
`static void` | `setChildElementText(org.w3c.dom.Element element, java.lang.String name, java.lang.String text)`
`static void` | `setElementText(org.w3c.dom.Element elm, java.lang.String text)`
`static boolean` | `setNodeValue(org.w3c.dom.Node domNode, java.lang.String string)`
`static java.lang.String` | `setXPathContent(java.lang.String emptyResponse, java.lang.String string, java.lang.String actor)`
`static java.lang.String` | `stripWhitespaces(java.lang.String content)`
`static java.lang.String` | `transferValues(java.lang.String source, java.lang.String dest)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XmlUtils

    public XmlUtils()

Method Detail

### parse

    public static org.w3c.dom.Document parse(java.io.InputStream in)

### parse

    public static org.w3c.dom.Document parse(java.lang.String fileName)
                                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### entitize

    public static java.lang.String entitize(java.lang.String xml)

### parse

    public static org.w3c.dom.Document parse(org.xml.sax.InputSource inputSource)
                                      throws java.io.IOException

  Throws:
    `java.io.IOException`

### serializePretty

    public static void serializePretty(org.w3c.dom.Document document)

### serializePretty

    public static void serializePretty(org.w3c.dom.Document dom,
                                       java.io.Writer writer)
                                throws java.io.IOException

  Throws:
    `java.io.IOException`

### serializePretty

    public static void serializePretty(org.apache.xmlbeans.XmlObject xmlObject,
                                       java.io.Writer writer)
                                throws java.io.IOException

  Throws:
    `java.io.IOException`

### serialize

    public static void serialize(org.w3c.dom.Document dom,
                                 java.io.Writer writer)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### serialize

    public static void serialize(org.w3c.dom.Element elm,
                                 java.io.Writer writer)
                          throws java.io.IOException

  Throws:
    `java.io.IOException`

### setElementText

    public static void setElementText(org.w3c.dom.Element elm,
                                      java.lang.String text)

### getChildElementText

    public static java.lang.String getChildElementText(org.w3c.dom.Element elm,
                                                       java.lang.String name)

### getFirstChildElement

    public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element elm)

### getFirstChildElement

    public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Element elm,
                                                           java.lang.String name)

### getFirstChildElementNS

    public static org.w3c.dom.Element getFirstChildElementNS(org.w3c.dom.Element elm,
                                                             java.lang.String tns,
                                                             java.lang.String localName)

### getElementText

    public static java.lang.String getElementText(org.w3c.dom.Element elm)

### getFragmentText

    public static java.lang.String getFragmentText(org.w3c.dom.DocumentFragment elm)

### getChildElementText

    public static java.lang.String getChildElementText(org.w3c.dom.Element elm,
                                                       java.lang.String name,
                                                       java.lang.String defaultValue)

### getNodeValue

    public static java.lang.String getNodeValue(org.w3c.dom.Node node)

### createNodeFromPath

    public static org.w3c.dom.Node createNodeFromPath(org.w3c.dom.Element modelElement,
                                                      java.lang.String path)

### addChildElement

    public static org.w3c.dom.Element addChildElement(org.w3c.dom.Element element,
                                                      java.lang.String name,
                                                      java.lang.String text)

### setChildElementText

    public static void setChildElementText(org.w3c.dom.Element element,
                                           java.lang.String name,
                                           java.lang.String text)

### parseXml

    public static org.w3c.dom.Document parseXml(java.lang.String xmlString)
                                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### dumpParserErrors

    public static void dumpParserErrors(org.apache.xmlbeans.XmlObject xmlObject)

### transferValues

    public static java.lang.String transferValues(java.lang.String source,
                                                  java.lang.String dest)

### getElementPath

    public static java.lang.String getElementPath(org.w3c.dom.Element element)

  Returns absolute xpath for specified element, ignores namespaces

  Parameters:
    `elm` - the element to create for
  Returns:
    the elements path in its containing document

### getElementIndex

    public static int getElementIndex(org.w3c.dom.Node element)

  Gets the index of the specified element amongst elements with the same name

  Parameters:
    `element` - the element to get for
  Returns:
    the index of the element, will be >= 1

### declareXPathNamespaces

    public static java.lang.String declareXPathNamespaces(java.lang.String xmlString)
                                                   throws org.apache.xmlbeans.XmlException

  Throws:
    `org.apache.xmlbeans.XmlException`

### prettyPrintXml

    public static java.lang.String prettyPrintXml(java.lang.String xml)

### prettyPrintXml

    public static java.lang.String prettyPrintXml(org.apache.xmlbeans.XmlObject xml)

### declareXPathNamespaces

    public static java.lang.String declareXPathNamespaces(WsdlInterface iface)

### createXPath

    public static java.lang.String createXPath(org.w3c.dom.Node node)

### createXPath

    public static java.lang.String createXPath(org.w3c.dom.Node node,
                                               boolean anonymous,
                                               boolean selectText,
                                               XPathModifier modifier)

### createXPathData

    public static XmlUtils.XPathData createXPathData(org.w3c.dom.Node node)

### createXPathData

    public static XmlUtils.XPathData createXPathData(org.w3c.dom.Node node,
                                                     boolean anonymous,
                                                     boolean selectText)

### setNodeValue

    public static boolean setNodeValue(org.w3c.dom.Node domNode,
                                       java.lang.String string)

### declareXPathNamespaces

    public static java.lang.String declareXPathNamespaces(org.apache.xmlbeans.XmlObject xmlObject)

### setXPathContent

    public static java.lang.String setXPathContent(java.lang.String emptyResponse,
                                                   java.lang.String string,
                                                   java.lang.String actor)

### getQName

    public static javax.xml.namespace.QName getQName(org.w3c.dom.Node node)

### removeXPathNamespaceDeclarations

    public static java.lang.String removeXPathNamespaceDeclarations(java.lang.String xpath)

### stripWhitespaces

    public static java.lang.String stripWhitespaces(java.lang.String content)

### getChildElements

    public static org.w3c.dom.NodeList getChildElements(org.w3c.dom.Element elm)

### getChildElementsByTagName

    public static org.w3c.dom.NodeList getChildElementsByTagName(org.w3c.dom.Element elm,
                                                                 java.lang.String name)

### getChildElementsByTagNameNS

    public static org.w3c.dom.NodeList getChildElementsByTagNameNS(org.w3c.dom.Element elm,
                                                                   java.lang.String namespaceUri,
                                                                   java.lang.String localName)

### seemsToBeXml

    public static boolean seemsToBeXml(java.lang.String str)

### extractNamespaces

    public static java.lang.String extractNamespaces(java.lang.String xpath)

### removeUnneccessaryNamespaces

    public static java.lang.String removeUnneccessaryNamespaces(java.lang.String xml)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 eviware.com. All Rights Reserved.