|
XML for Java Compatibility API 2.0.11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.xml.parser.Child | +--com.ibm.xml.parser.ElementDecl
Element declarations in the DTD determine the possible structure of the XML document. The following structures, known as content models, are supported for element declaration:
<!ELEMENT graphic EMPTY>
would have the Element tag <graphic/>
appear in the XML document.
<!ELEMENT text (#PCDATA)>
could have the Element
tag <text>a group of character data</text>
appear in the XML document.
To illustrate this point, the element declaration
<!ELEMENT memo (from, to+, cc*, date?, content)>
could have the Element
tag <memo> <from>me</from> <to>you</to> <to>and you</to> <content>hello world</content> </memo>
appear in the XML document.
Child
, Serialized FormField Summary | |
static int |
ANY
|
static int |
EMPTY
|
static int |
MODEL_GROUP
|
Fields inherited from class com.ibm.xml.parser.Child |
ATTDEF,
ATTLIST,
ELEMENT_DECL,
NAME_ATTDEF,
NAME_ATTLIST,
NAME_CDATA,
NAME_COMMENT,
NAME_DOCFRAGMENT,
NAME_DOCUMENT,
NAME_ELEMENT_DECL,
NAME_PSEUDONODE,
NAME_TEXT,
PSEUDONODE |
Constructor Summary | |
ElementDecl(java.lang.String name,
ContentModel contentModel)
Constructor. |
Method Summary | |
void |
acceptPost(Visitor visitor)
Implements the accept operation of the visitor design pattern when the end of an ElementDecl Node is recognized when traversing the document object tree. |
void |
acceptPre(Visitor visitor)
Implements the accept operation of the visitor design pattern when the start of an ElementDecl Node is recognized when traversing the document object tree. |
java.lang.Object |
clone()
Clone this element definition Node using the appropriate factory. |
boolean |
equals(org.w3c.dom.Node arg,
boolean deep)
|
int |
getContentType()
Returns the content type which represents the content model used by this element definition. |
java.lang.String |
getName()
Returns this element definition's name. |
java.lang.String |
getNodeName()
|
short |
getNodeType()
Returns that this object is an element definition Node. |
ContentModel |
getXML4JContentModel()
|
void |
setContentType(int contentType)
Sets the content type which represents the content model used by this element definition. |
void |
setName(java.lang.String name)
Sets this element definition's name. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int EMPTY
public static final int ANY
public static final int MODEL_GROUP
Constructor Detail |
public ElementDecl(java.lang.String name, ContentModel contentModel)
name
- This element definition's name.contentModel
- The content model to associate with this element definition,
or null if the content model is to be set later.Method Detail |
public java.lang.Object clone()
This method is defined by Child.
Child.clone()
public boolean equals(org.w3c.dom.Node arg, boolean deep)
deep
- ignored.public short getNodeType()
This method is defined by DOM.
public java.lang.String getNodeName()
public java.lang.String getName()
setName(java.lang.String)
public void setName(java.lang.String name)
name
- The string that is this element definition's name.getName()
public int getContentType()
setContentType(int)
public void setContentType(int contentType)
contentType
- The content type for this element's definition.
Must be one of EMPTY/ANY/MODEL_GROUP.getContentType()
public void acceptPre(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)Visitor
,
TreeTraversal
,
NonRecursivePreorderTreeTraversal
,
TreeTraversalException
public void acceptPost(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)Visitor
,
TreeTraversal
,
NonRecursivePreorderTreeTraversal
,
TreeTraversalException
public ContentModel getXML4JContentModel()
|
XML for Java Compatibility API 2.0.11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |