com.groupdocs.editor.htmlcss.resources.textual

Class XmlText

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> Disposed
      Event, which occurs when this XML resource is disposed
    • Constructor Summary

      Constructors 
      Constructor and Description
      XmlText(String name, InputStream binaryContent, Charset originalEncoding)
      Creates new XML resource from specified byte stream and encoding
      XmlText(String name, String textualContent, Charset originalEncoding)
      Creates new XML resource from specified textual content with encoding
    • Field Detail

      • Disposed

        public final com.groupdocs.editor.events.ProcessEvents<com.groupdocs.editor.events.ProcessEventHandler> Disposed

        Event, which occurs when this XML resource is disposed

    • Constructor Detail

      • XmlText

        public XmlText(String name,
               InputStream binaryContent,
               Charset originalEncoding)

        Creates new XML resource from specified byte stream and encoding

        Parameters:
        name - Name of the XML resource without file extension.
        binaryContent - Content as byte stream. Reading begins from original position. Cannot be null.
        originalEncoding - Encoding of the XML resource.
      • XmlText

        public XmlText(String name,
               String textualContent,
               Charset originalEncoding)

        Creates new XML resource from specified textual content with encoding

        Parameters:
        name - Name of the XML resource without file extension.
        textualContent - Content of the XML resource as a standard string.
        originalEncoding - Encoding of the XML resource.
    • Method Detail

      • dispose

        public void dispose()

        Disposes this XML resource, disposing its content and making most methods and properties non-working

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • equals

        public boolean equals(IHtmlResource other)

        Checks this instance with specified on equality.

        Parameters:
        other - IHtmlResource
        Returns:
      • equals

        public boolean equals(Object obj)

        Determines whether the specified Object is equal to the current Object.

        Overrides:
        equals in class Object
      • getEncoding

        public Charset getEncoding()

        Returns encoding of this XML resource. Usually returns UTF-8.

        Specified by:
        getEncoding in interface ITextResource
      • getFilenameWithExtension

        public String getFilenameWithExtension()

        Returns correct filename of this XML resource, which consists of name and extension

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
      • getName

        public String getName()

        Returns name of this XML resource without file extension

        Specified by:
        getName in interface IHtmlResource
      • getParsedDocument

        public Document getParsedDocument()

        Returns an "XmlDocument" from this XML resource

      • getTextContent

        public String getTextContent()

        Returns content of this XML resource as a standard string

        Specified by:
        getTextContent in interface IHtmlResource
      • getTypeInstance

        public IResourceType getTypeInstance()

        Gets the type of the current instance.

      • hashCode

        public int hashCode()

        Serves as a hash function for a particular type.

        Overrides:
        hashCode in class Object
      • isDisposed

        public boolean isDisposed()

        Determines whether this XML resource is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
      • save

        public void save(String fullPathToFile)

        Saves this XML resource to the specified file

        Specified by:
        save in interface IHtmlResource
        Parameters:
        fullPathToFile - Full path to the file, which will be created or rewrited