/** creates a new element in the instance * *Theelementwillbeinsertedimmediatelybelowtherootnodeoftheinstance. * *@param_elementNamethenameoftheto-be-createdelement *@returnthenodeofthenewlycreatedelement
*/ public XNode createElement( String _elementName ) throws DOMException
{ return createElement( m_domInstance, _elementName, null );
}
/** creates a new element in the instance * *TheelementwillbeinsertedimmediatelybelowagivenXNode. * *@param_parentElement *thenodewhosechildshallbecreated *@param_elementName *thenameoftheto-be-createdelement *@param_initialNodeValue *theinitialvaluetosetatthenode.Mightbenull,inthiscasenovalueisset. *@return *thenodeofthenewlycreatedelement
*/ private XNode createElement( XNode _parentElement, String _elementName, String _initialNodeValue ) throws DOMException
{
XNode node = _parentElement.appendChild(
m_model.getUIHelper().createElement( _parentElement, _elementName )
); if ( _initialNodeValue != null )
node.setNodeValue( _initialNodeValue ); return node;
}
/** removes a child of the root-level node from the instance * *@param_elementName *thenameoftheto-be-removedchild
*/ public XNode removeNode( String _elementName ) throws DOMException
{ return removeNode( m_domInstance, _elementName );
}
/** removes a node from the instance * *@param_parentElement *thenodewhosechildistoberemoved *@param_elementName *thenameoftheto-be-removedchild
*/ private XNode removeNode( XNode _parentElement, String _elementName ) throws DOMException
{
XNodeList nodes = _parentElement.getChildNodes(); for ( int i=0; i<nodes.getLength(); ++i )
{
XNode node = nodes.item(i); if ( node.getLocalName().equals( _elementName ) )
{
_parentElement.removeChild( node ); return node;
}
} thrownew NoSuchElementException();
}
/** creates an attribute for the given node * *@param_parentElement *theelementatwhichtheattributeshouldbecreated *@param_attribName *thenameoftheto-be-createdattribute *@return *theDOMnode,whichhasalreadybeeninsertedintotheDOMtree
*/ public XNode createAttribute( XNode _parentElement, String _attribName ) throws DOMException
{ return createAttribute( _parentElement, _attribName, null );
}
/** creates an attribute for the given node * *@param_parentElement *theelementatwhichtheattributeshouldbecreated *@param_attribName *thenameoftheto-be-createdattribute *@param_initialNodeValue *theinitialvaluetosetatthenode.Mightbenull,inthiscasenovalueisset. *@return *theDOMnode,whichhasalreadybeeninsertedintotheDOMtree
*/ public XNode createAttribute( XNode _parentElement, String _attribName, String _initialNodeValue ) throws DOMException
{
XNode node = _parentElement.appendChild(
m_model.getUIHelper().createAttribute( _parentElement, _attribName )
); if ( _initialNodeValue != null )
node.setNodeValue( _initialNodeValue ); return node;
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-04)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.