Class XMLSupport


  • public final class XMLSupport
    extends java.lang.Object
    • Method Detail

      • init

        public static void init()
        Calling this method allows us to load/initialize this class during startup.
      • checkElementOrder

        public static int checkElementOrder​(java.lang.String elementName,
                                            int current,
                                            int previous,
                                            boolean repeating)
        Checks the order of the current element using its position relative to the position of the previous element
        Parameters:
        elementName - the name of the current element
        current - the position of the current element in the sequence
        previous - the position of the previous element in the sequence
        repeating - true if the element is allowed to repeat
        Returns:
        the position of the current element
        Throws:
        java.lang.IllegalArgumentException - if the element is out of order or if the parser has already seen the element and it is not allowed to repeat
      • createStreamReaderDelegate

        public static XMLSupport.StreamReaderDelegate createStreamReaderDelegate​(java.io.InputStream in)
                                                                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createStreamReaderDelegate

        public static XMLSupport.StreamReaderDelegate createStreamReaderDelegate​(java.io.Reader reader)
                                                                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createStreamWriterDelegate

        public static XMLSupport.StreamWriterDelegate createStreamWriterDelegate​(java.io.OutputStream out)
                                                                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createStreamWriterDelegate

        public static XMLSupport.StreamWriterDelegate createStreamWriterDelegate​(java.io.Writer writer)
                                                                          throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public static javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.InputStream in)
                                                                      throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamReader

        public static javax.xml.stream.XMLStreamReader createXMLStreamReader​(java.io.Reader reader)
                                                                      throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamWriter

        public static javax.xml.stream.XMLStreamWriter createXMLStreamWriter​(java.io.OutputStream out)
                                                                      throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createXMLStreamWriter

        public static javax.xml.stream.XMLStreamWriter createXMLStreamWriter​(java.io.Writer writer)
                                                                      throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • isResourceContainer

        public static boolean isResourceContainer​(java.lang.String elementName)
      • parseDiv

        public static java.lang.String parseDiv​(javax.xml.stream.XMLStreamReader reader)
                                         throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • requireNamespace

        public static void requireNamespace​(javax.xml.stream.XMLStreamReader reader,
                                            java.lang.String namespaceURI)
                                     throws javax.xml.stream.XMLStreamException
        Throws:
        javax.xml.stream.XMLStreamException
      • createNonClosingStreamWriterDelegate

        public static XMLSupport.StreamWriterDelegate createNonClosingStreamWriterDelegate​(javax.xml.stream.XMLStreamWriter writer)
      • createTransformer

        public static javax.xml.transform.Transformer createTransformer()