Interface XmlSerializable

    • Method Detail

      • toDocumentFragment

        default DocumentFragment toDocumentFragment​(Document document,
                                                    boolean includeNSPrefix,
                                                    boolean declareNS)
                                             throws SAML2Exception
        Serializes the element into an XML DocumentFragment. A default implementation is provided for compatibility with legacy code that implements toXMLString(), but it is highly recommended to override this method.
        Parameters:
        document - the parent Document to create the document fragment from.
        includeNSPrefix - whether to include a namespace prefix in the document elements.
        declareNS - whether to declare any namespaces or assume that they are already declared.
        Returns:
        the XML document fragment representing this SAML2 element.
        Throws:
        SAML2Exception - if the element cannot be serialized for any reason.
      • toXMLString

        @Deprecated
        default String toXMLString​(boolean includeNSPrefix,
                                   boolean declareNS)
                            throws SAML2Exception
        Returns an XML String representation of this element.
        Parameters:
        includeNSPrefix - Determines whether or not the namespace qualifier is prepended to the Element when converted.
        declareNS - Determines whether or not the namespace is declared within the Element.
        Returns:
        A String representation.
        Throws:
        SAML2Exception - if something went wrong during conversion