org.apache.axiom.om.impl.util

## Class OMSerializerUtil

- java.lang.Object
- - org.apache.axiom.om.impl.util.OMSerializerUtil

-     public class OMSerializerUtil
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OMSerializerUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `generateSetPrefix(String prefix, String namespace, javax.xml.stream.XMLStreamWriter writer, boolean attr)` Generate setPrefix/setDefaultNamespace if the prefix is not associated
    `static String` | `getNextNSPrefix()` Deprecated.
    `static String` | `getNextNSPrefix(javax.xml.stream.XMLStreamWriter writer)` Deprecated. This is an internal method that is no longer used.
    `static boolean` | `isAssociated(String prefix, String namespace, javax.xml.stream.XMLStreamWriter writer)`
    `static boolean` | `isSetPrefixBeforeStartElement(javax.xml.stream.XMLStreamWriter writer)` Deprecated. This method was used to work around a StAX conformance issue in early versions of the XL XP-J parser. This is now handled by `StAXDialect`, and this method always returns `false`.
    `static void` | `serializeAttribute(OMAttribute attr, javax.xml.stream.XMLStreamWriter writer)` Deprecated. use serializeStartpart instead
    `static void` | `serializeAttributes(OMElement element, javax.xml.stream.XMLStreamWriter writer)` Deprecated. Consider using serializeStartpart instead
    `static void` | `serializeByPullStream(OMElement element, javax.xml.stream.XMLStreamWriter writer)` Deprecated. This is an internal method that is no longer used.
    `static void` | `serializeByPullStream(OMElement element, javax.xml.stream.XMLStreamWriter writer, boolean cache)` Deprecated. This is an internal method that is no longer used.
    `static void` | `serializeEndpart(javax.xml.stream.XMLStreamWriter writer)` Deprecated. This is an internal method that is no longer used.
    `static void` | `serializeNamespace(OMNamespace namespace, javax.xml.stream.XMLStreamWriter writer)` Deprecated. Use serializeStartpart instead
    `static void` | `serializeNamespaces(OMElement element, javax.xml.stream.XMLStreamWriter writer)` Deprecated. Use serializeStartpart instead
    `static void` | `serializeNormal(OMElement element, javax.xml.stream.XMLStreamWriter writer, boolean cache)` Deprecated. This is an internal method that is no longer used.
    `static void` | `serializeStartpart(OMElement element, String localName, javax.xml.stream.XMLStreamWriter writer)` Deprecated. This is an internal method that is no longer used.
    `static void` | `serializeStartpart(OMElement element, javax.xml.stream.XMLStreamWriter writer)` Deprecated. This is an internal method that is no longer used.

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

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

- - ### Constructor Detail

    - #### OMSerializerUtil

          public OMSerializerUtil()

  - ### Method Detail

    - #### serializeEndpart

          public static void serializeEndpart(javax.xml.stream.XMLStreamWriter writer)
                                       throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Method serializeEndpart.
      Parameters:
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeAttribute

          public static void serializeAttribute(OMAttribute attr,
                                                javax.xml.stream.XMLStreamWriter writer)
                                         throws javax.xml.stream.XMLStreamException

      Deprecated. use serializeStartpart instead
      Method serializeAttribute.
      Parameters:
        `attr` -
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeNamespace

          public static void serializeNamespace(OMNamespace namespace,
                                                javax.xml.stream.XMLStreamWriter writer)
                                         throws javax.xml.stream.XMLStreamException

      Deprecated. Use serializeStartpart instead
      Method serializeNamespace.
      Parameters:
        `namespace` -
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### isSetPrefixBeforeStartElement

          public static boolean isSetPrefixBeforeStartElement(javax.xml.stream.XMLStreamWriter writer)

      Deprecated. This method was used to work around a StAX conformance issue in early versions of the XL XP-J parser. This is now handled by `StAXDialect`, and this method always returns `false`.

    - #### serializeStartpart

          public static void serializeStartpart(OMElement element,
                                                javax.xml.stream.XMLStreamWriter writer)
                                         throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Method serializeStartpart. Serialize the start tag of an element.
      Parameters:
        `element` -
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeStartpart

          public static void serializeStartpart(OMElement element,
                                                String localName,
                                                javax.xml.stream.XMLStreamWriter writer)
                                         throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Method serializeStartpart. Serialize the start tag of an element.
      Parameters:
        `element` -
        `localName` - (in some cases, the caller wants to force a different localName)
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeNamespaces

          public static void serializeNamespaces(OMElement element,
                                                 javax.xml.stream.XMLStreamWriter writer)
                                          throws javax.xml.stream.XMLStreamException

      Deprecated. Use serializeStartpart instead
      serializeNamespaces
      Parameters:
        `element` -
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeAttributes

          public static void serializeAttributes(OMElement element,
                                                 javax.xml.stream.XMLStreamWriter writer)
                                          throws javax.xml.stream.XMLStreamException

      Deprecated. Consider using serializeStartpart instead
      Serialize attributes
      Parameters:
        `element` -
        `writer` -
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeNormal

          public static void serializeNormal(OMElement element,
                                             javax.xml.stream.XMLStreamWriter writer,
                                             boolean cache)
                                      throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeByPullStream

          public static void serializeByPullStream(OMElement element,
                                                   javax.xml.stream.XMLStreamWriter writer)
                                            throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### serializeByPullStream

          public static void serializeByPullStream(OMElement element,
                                                   javax.xml.stream.XMLStreamWriter writer,
                                                   boolean cache)
                                            throws javax.xml.stream.XMLStreamException

      Deprecated. This is an internal method that is no longer used.
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### getNextNSPrefix

          public static String getNextNSPrefix()

      Deprecated.
      Get the next prefix name
      Returns:
        next prefix name

    - #### getNextNSPrefix

          public static String getNextNSPrefix(javax.xml.stream.XMLStreamWriter writer)

      Deprecated. This is an internal method that is no longer used.

    - #### generateSetPrefix

          public static String generateSetPrefix(String prefix,
                                                 String namespace,
                                                 javax.xml.stream.XMLStreamWriter writer,
                                                 boolean attr)
                                          throws javax.xml.stream.XMLStreamException

      Generate setPrefix/setDefaultNamespace if the prefix is not associated
      Parameters:
        `prefix` -
        `namespace` -
        `writer` -
        `attr` -
      Returns:
        prefix name if a setPrefix/setDefaultNamespace is performed
      Throws:
        `javax.xml.stream.XMLStreamException`

    - #### isAssociated

          public static boolean isAssociated(String prefix,
                                             String namespace,
                                             javax.xml.stream.XMLStreamWriter writer)
                                      throws javax.xml.stream.XMLStreamException

      Parameters:
        `prefix` -
        `namespace` -
        `writer` -
      Returns:
        true if the prefix is associated with the namespace in the current context
      Throws:
        `javax.xml.stream.XMLStreamException`

Copyright © The Apache Software Foundation. All Rights Reserved.