Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.swing.text.html.parser

Class DTD

  • All Implemented Interfaces:
    DTDConstants

    public class DTD
    extends Object
    implements DTDConstants
    The representation of an SGML DTD. DTD describes a document syntax and is used in parsing of HTML documents. It contains a list of elements and their attributes as well as a list of entities defined in the DTD.
    See Also:
    Element, AttributeList, ContentModel, Parser
    • Constructor Detail

      • DTD

        protected DTD(String name)
        Creates a new DTD with the specified name.
        Parameters:
        name - the name, as a String of the new DTD
    • Method Detail

      • getName

        public String getName()
        Gets the name of the DTD.
        Returns:
        the name of the DTD
      • getEntity

        public Entity getEntity(String name)
        Gets an entity by name.
        Returns:
        the Entity corresponding to the name String
      • getEntity

        public Entity getEntity(int ch)
        Gets a character entity.
        Returns:
        the Entity corresponding to the ch character
      • getElement

        public Element getElement(String name)
        Gets an element by name. A new element is created if the element doesn't exist.
        Parameters:
        name - the requested String
        Returns:
        the Element corresponding to name, which may be newly created
      • getElement

        public Element getElement(int index)
        Gets an element by index.
        Parameters:
        index - the requested index
        Returns:
        the Element corresponding to index
      • defineEntity

        public Entity defineEntity(String name,
                          int type,
                          char[] data)
        Defines an entity. If the Entity specified by name, type, and data exists, it is returned; otherwise a new Entity is created and is returned.
        Parameters:
        name - the name of the Entity as a String
        type - the type of the Entity
        data - the Entity's data
        Returns:
        the Entity requested or a new Entity if not found
      • defineElement

        public Element defineElement(String name,
                            int type,
                            boolean omitStart,
                            boolean omitEnd,
                            ContentModel content,
                            BitSet exclusions,
                            BitSet inclusions,
                            AttributeList atts)
        Returns the Element which matches the specified parameters. If one doesn't exist, a new one is created and returned.
        Parameters:
        name - the name of the Element
        type - the type of the Element
        omitStart - true if start should be omitted
        omitEnd - true if end should be omitted
        content - the ContentModel
        atts - the AttributeList specifying the Element
        Returns:
        the Element specified
      • defineAttributes

        public void defineAttributes(String name,
                            AttributeList atts)
        Defines attributes for an Element.
        Parameters:
        name - the name of the Element
        atts - the AttributeList specifying the Element
      • defEntity

        public Entity defEntity(String name,
                       int type,
                       int ch)
        Creates and returns a character Entity.
        Parameters:
        name - the entity's name
        Returns:
        the new character Entity
      • defEntity

        protected Entity defEntity(String name,
                       int type,
                       String str)
        Creates and returns an Entity.
        Parameters:
        name - the entity's name
        Returns:
        the new Entity
      • defElement

        protected Element defElement(String name,
                         int type,
                         boolean omitStart,
                         boolean omitEnd,
                         ContentModel content,
                         String[] exclusions,
                         String[] inclusions,
                         AttributeList atts)
        Creates and returns an Element.
        Parameters:
        name - the element's name
        Returns:
        the new Element
      • defAttributeList

        protected AttributeList defAttributeList(String name,
                                     int type,
                                     int modifier,
                                     String value,
                                     String values,
                                     AttributeList atts)
        Creates and returns an AttributeList.
        Parameters:
        name - the attribute list's name
        Returns:
        the new AttributeList
      • defContentModel

        protected ContentModel defContentModel(int type,
                                   Object obj,
                                   ContentModel next)
        Creates and returns a new content model.
        Parameters:
        type - the type of the new content model
        Returns:
        the new ContentModel
      • toString

        public String toString()
        Returns a string representation of this DTD.
        Overrides:
        toString in class Object
        Returns:
        the string representation of this DTD
      • putDTDHash

        public static void putDTDHash(String name,
                      DTD dtd)
      • getDTD

        public static DTD getDTD(String name)
                          throws IOException
        Returns a DTD with the specified name. If a DTD with that name doesn't exist, one is created and returned. Any uppercase characters in the name are converted to lowercase.
        Parameters:
        name - the name of the DTD
        Returns:
        the DTD which corresponds to name
        Throws:
        IOException

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/swing/text/html/parser/dtd.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut