Interface XmlWriter

  • All Known Implementing Classes:
    XmlWriterToTree

    public interface XmlWriter
    This interface is used to construct XML via a sequence of API calls.

    This is written to be similar to javax.xml.stream.XMLStreamWriter, but has slightly different requirements. Specifically, we need to be able to create an "ID" type attribute, and get the current node.

    • Method Detail

      • writeTextElement

        void writeTextElement​(String prefix,
                              String localName,
                              String namespaceURI,
                              String value)
        Convenience method that writes both a start and end tag, with text contents as provided.
        Parameters:
        prefix -
        localName -
        namespaceURI -
        value -
      • writeNamespace

        void writeNamespace​(String prefix,
                            String namespaceURI)
      • writeCharacters

        void writeCharacters​(String text)
      • writeComment

        void writeComment​(String text)
      • getCurrentLocalName

        String getCurrentLocalName()
        Get the local name of the current element.
        Returns:
        the local name of the current element.
      • getCurrentNodeAsStructure

        XMLStructure getCurrentNodeAsStructure()
      • marshalStructure

        void marshalStructure​(XMLStructure toMarshal,
                              String dsPrefix,
                              XMLCryptoContext context)
                       throws MarshalException
        This method marshals a structure, and relies on implementation specific details for how an instance of a particular class maps to the method that actually does the marshaling.
        Parameters:
        toMarshal - The object to be marshaled.
        dsPrefix - The digital signature prefix.
        context - The context for marshaling.
        Throws:
        MarshalException - Thrown if something goes wrong during the marshaling.