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

## be.ehealth.technicalconnector.utils
Class ConnectorXmlUtils

    java.lang.Object
      be.ehealth.technicalconnector.utils.ConnectorXmlUtils

    public final class ConnectorXmlUtils

extends Object

Utility class to parse JAXB objects

Method Summary
`static void` | `dump(Object obj)` Logs a JAXB object as an XML String Debug logging needs to be activated
`static String` | `flatten(String xml)` Removes tabs, line feeds and whitespaces between elements.
`static String` | `format(String unformattedXml)` Method to format/indent a XML string
`static String` | `format(String unformattedXml, Source xslt)` Method to format/indent a XML String and applying an XSLT tranformation.
`static Element` | `getFirstChildElement(Node node)`
`static boolean` | `isXMLLike(String inXMLStr)` Deprecated.
`static void` | `logXmlObject(Object obj)` Deprecated. replaced by the dump method
`static String` | `marshal(Object obj)` Deprecated. replaced by `ConnectorXmlUtils`.toString(Object obj)
`static byte[]` | `toByteArray(Node node)` Parse the node to an byte[]
`static byte[]` | `toByteArray(Object obj)` Parse the object to an byte[]
`static byte[]` | `toByteArray(Object data, QName rootTag)` Deprecated. replaced by `ConnectorXmlUtils`.toByteArray(Object obj)
`static Document` | `toDocument(byte[] data)`
`static Document` | `toDocument(Object obj)` Parse the JAXB object to an org.w3c.dom.Document
`static Document` | `toDocument(String xml)`
`static Element` | `toElement(byte[] data)`
`static String` | `toString(Node node)` To string based on a `Node`
`static String` | `toString(Object obj)` To string based on a JAXB object
`static String` | `toString(Source source)` To string based on a `Source`

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

Method Detail

### getFirstChildElement

    public static Element getFirstChildElement(Node node)

### logXmlObject

    @Deprecated
    public static void logXmlObject(Object obj)

  Deprecated. replaced by the dump method

  Logs a JAXB object as an XML String Debug logging needs to be activated

  Parameters:
    `obj` - the object to log

### dump

    public static void dump(Object obj)

  Logs a JAXB object as an XML String Debug logging needs to be activated

  Parameters:
    `obj` - the object to log

### marshal

    @Deprecated
    public static String marshal(Object obj)

  Deprecated. replaced by `ConnectorXmlUtils`.toString(Object obj)

  Parse the JAXB object to an XML string

  Parameters:
    `obj` - the object to parse
  Returns:
    String the XML string

### toByteArray

    public static byte[] toByteArray(Node node)

  Parse the node to an byte[]

  Returns:
    String the XML string

### toByteArray

    public static byte[] toByteArray(Object obj)

  Parse the object to an byte[]

  Parameters:
    `obj` - the object to parse
  Returns:
    String the XML string

### toByteArray

    @Deprecated
    public static byte[] toByteArray(Object data,
                                                QName rootTag)

  Deprecated. replaced by `ConnectorXmlUtils`.toByteArray(Object obj)

  To xml byte array.

  Parameters:
    `data` - the data
  Returns:
    the byte[]

### toDocument

    public static Document toDocument(byte[] data)
                               throws TechnicalConnectorException

  Parameters:
    `data` -
  Returns:
  Throws:
    `TechnicalConnectorException`

### toDocument

    public static Document toDocument(Object obj)

  Parse the JAXB object to an org.w3c.dom.Document

  Parameters:
    `obj` - the object to parse
  Returns:
    org.w3c.dom.Document

### toDocument

    public static Document toDocument(String xml)
                               throws TechnicalConnectorException

  Parameters:
    `xml` - message as string
  Returns:
  Throws:
    `TechnicalConnectorException`

### toElement

    public static Element toElement(byte[] data)
                             throws TechnicalConnectorException

  Parameters:
    `data` -
  Returns:
  Throws:
    `TechnicalConnectorException`

### toString

    public static String toString(Object obj)

  To string based on a JAXB object

### toString

    public static String toString(Node node)
                           throws TechnicalConnectorException

  To string based on a `Node`

  Throws:
    `TechnicalConnectorException`

### toString

    public static String toString(Source source)
                           throws TechnicalConnectorException

  To string based on a `Source`

  Throws:
    `TechnicalConnectorException`

### flatten

    public static String flatten(String xml)

  Removes tabs, line feeds and whitespaces between elements.

### format

    public static String format(String unformattedXml)

  Method to format/indent a XML string

  Parameters:
    `unformattedXml` -
  Returns:

### format

    public static String format(String unformattedXml,
                                Source xslt)

  Method to format/indent a XML String and applying an XSLT tranformation.

  Parameters:
    `unformattedXml` -
    `xslt` -
  Returns:

### isXMLLike

    @Deprecated
    public static boolean isXMLLike(String inXMLStr)

  Deprecated.

  Verify if the given `String` is an 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

Connector Package PERSDENTIST 3.11.1 API
Copyright © {inceptionYear}-2016 eHealth. All Rights Reserved.