dtdmixed.java

来自「XML的DTD的解析、对XML文件作用的JAVA源代码。」· Java 代码 · 共 48 行

JAVA
48
字号
package com.wutka.dtd;import java.io.*;import java.util.*;/** Represents a mixed Element content (PCDATA + choice/sequence). * Mixed Element can contain #PCDATA, or it can contain * #PCDATA followed by a list of pipe-separated names. * * @author Mark Wutka * @version $Revision: 1.16 $ $Date: 2002/07/19 01:20:11 $ by $Author: wutka $ */public class DTDMixed extends DTDContainer{    public DTDMixed()    {    }/** Writes out a declaration for mixed content */    public void write(PrintWriter out)        throws IOException    {        out.print("(");        Enumeration e = getItemsVec().elements();        boolean isFirst = true;        while (e.hasMoreElements())        {            if (!isFirst) out.print(" | ");            isFirst = false;            DTDItem item = (DTDItem) e.nextElement();            item.write(out);        }        out.print(")");        cardinal.write(out);    }    public boolean equals(Object ob)    {        if (ob == this) return true;        if (!(ob instanceof DTDMixed)) return false;        return super.equals(ob);    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?