Elements represent the building blocks of everything in MN8. An element
is a primary data type which can have attributes and it's values can be
a Concept (basically everything).
$elem TYPEOF Element
$attr = Attribute.create("name", "jon")
$elem.addAttribute( $attr )
$elem.setValue("employee of the year")
PRINT $elem
name: jon
employee of the year
PRINT $elem.toXML
< name="jon">employee of the yea</>
$elem.setLabel("employee")
PRINT $elem
employee
name: jon
employee of the year
PRINT $elem.toXML
<employee name="jon">employee of the year</employee>
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getConceptsAtPath, getErrorHandler, getInheritedConcepts, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML |
|
Parameters: |
$label : | The label of this Element. |
$value : | The value of this Element. |
|
Constructs a new Element concept with the specified value and label.
Adds a new attribute to this Element.
Parameters: |
$name : | The name of the attribute to add. |
$label : | The label of the attribute to add. |
$value : | The value of the attribute to add. |
|
Adds a new attribute to this element with the specified name, label and
value.
Parameters: |
$value : | The value to be added. |
|
Adds a new value to this Element.
Returns a series concept containing all attributes of this Element.
Returns a string concept representing this Element's label.
Returns a string concept representing this Element's name.
Returns a concept representing this Element's value.
Returns this concept's value type.
Returns true always when the element has as value more
items/elements (usualy a TypedSeries)
Parameters: |
$attributes : | Attributes to be set. |
|
Sets the attributes from the specified series to this Element concept.
Parameters: |
$label : | The new label to be set. |
|
Sets the label of this Element concept to the specified text.
Parameters: |
$value : | The value to be set. |
|
Sets the value of this Element concept to the specified value.
Returns a stream representing the XML rendering of this concept.