public class XmlElement extends java.lang.Object implements XmlModelItem
Constructor and Description |
---|
XmlElement(XmlDataWorkspace ws,
XmlDataElementTag eTag,
XmlType model)
Creates a global Element in the specified workspace.
|
XmlElement(XmlDataWorkspace ws,
XmlDataElementTag eTag,
XmlType model,
int min,
int max)
Creates a local element within an XmlGroup.
|
Modifier and Type | Method and Description |
---|---|
NSField |
getField()
Creates an NSfield that implements the behavior defined by the constructor.
|
public XmlElement(XmlDataWorkspace ws, XmlDataElementTag eTag, XmlType model)
XmlElementRef
s.ws
- the XmlDataWorkspaceeTag
- the name of the elementmodel
- the content model. This must be an instance of XmlType which includes XmlSimpleType, XmlComplexType, XmlComplexTypeRef, and
XmlAnyType. If null is specified, the content is simple string. This is somewhat different than the W3C schema which defaults to anyType.
When using XmlElement, XmlAnyType() must be explicitly specified, while null defaults to XmlSimpleType.XmlDataWorkspace.element(XmlDataElementTag, XmlType)
public XmlElement(XmlDataWorkspace ws, XmlDataElementTag eTag, XmlType model, int min, int max)
ws
- the XmlDataWorkspaceeTag
- the name of the element. For unqualified, specify an XmlDataElementTag with no namespace component. For qualified,
specify a namespace that matches the namespace of the containing complex type.model
- the content model. This must be an instance of XmlType which includes XmlSimpleType, XmlComplexType, XmlComplexTypeRef, and
XmlAnyType. If null is specified, the content is simple string. This is somewhat different than the W3C schema which defaults to anyType.min
- the minimum number of allowed occurrencesmax
- the maimum number of allowed occurrences