XML -zelfstudie

XML HOME XML-introductie XML Hoe te gebruiken XML-structuur XML-syntaxis XML-elementen XML-kenmerken XML-naamruimten XML-weergave XML HTTP-verzoek XML-parser XML-DOM XML XPath XML XSLT XML XQuery XML XLink XML-validator XML-DTD XML Schema XML-server XML-voorbeelden XML-quiz XML-certificaat

XML AJAX

Ajax-introductie AJAX XMLHttp Ajax-verzoek Ajax-reactie AJAX XML-bestand AJAX PHP Ajax ASP AJAX-database AJAX-toepassingen Ajax-voorbeelden

XML-DOM

DOM-introductie DOM-knooppunten DOM-toegang DOM Node Info Lijst met DOM-knooppunten DOM doorkruisen DOM-navigatie DOM Waarden ophalen DOM-wijzigingsknooppunten DOM Knooppunten verwijderen DOM Knooppunten vervangen DOM Knooppunten maken DOM Knooppunten toevoegen DOM-kloonknooppunten DOM-voorbeelden

XPath- zelfstudie

XPath-introductie XPath-knooppunten XPath-syntaxis XPath-assen XPath-operators XPath-voorbeelden

XSLT- zelfstudie

XSLT-introductie XSL-talen XSLT-transformatie XSLT <sjabloon> XSLT <waarde-van> XSLT <voor elk> XSLT <sorteren> XSLT <if> XSLT <kiezen> XSLT toepassen XSLT op de client XSLT op de server XSLT Bewerk XML XSLT-voorbeelden

XQuery- zelfstudie

XQuery-introductie XQuery-voorbeeld XQuery FLWOR XQuery HTML XQuery-voorwaarden XQuery-syntaxis XQuery toevoegen XQuery selecteren XQuery-functies

XML -DTD

DTD Introductie DTD-bouwstenen DTD-elementen DTD-kenmerken DTD Elements vs Attr DTD-entiteiten DTD-voorbeelden

XSD- schema

XSD-introductie XSD Hoe kan ik? XSD <schema> XSD-elementen XSD-kenmerken XSD-beperkingen

XSD- complex

XSD-elementen XSD Leeg Alleen XSD-elementen Alleen XSD-tekst XSD gemengd XSD-indicatoren XSD <elke> XSD <anyAttribute> XSD-vervanging XSD-voorbeeld

XSD- gegevens

XSD-string XSD-datum XSD Numeriek XSD Diversen XSD-referentie

Webservices _

XML-services XML-WSDL XML SOAP XML-RDF XML-RSS

Referenties

Typen DOM-knooppunten DOM Node DOM-knooppuntlijst DOM NamedNodeMap DOM-document DOM-element DOM-kenmerk DOM-tekst DOM CDATA DOM-opmerking DOM XMLHttpRequest DOM-parser XSLT-elementen XSLT/XPath-functies

XML DOM - Het knooppuntobject


Het knooppuntobject

Het Node-object vertegenwoordigt een enkel knooppunt in de documentstructuur.

Een knooppunt kan een elementknooppunt, een attribuutknooppunt, een tekstknooppunt of elk ander knooppunttype zijn dat wordt uitgelegd in het hoofdstuk Knooppunttypen .

Merk op dat hoewel alle objecten de Node-eigenschappen / -methoden voor het omgaan met ouders en kinderen erven, niet alle objecten ouders of kinderen kunnen hebben. Tekstknooppunten hebben bijvoorbeeld mogelijk geen onderliggende knooppunten en het toevoegen van onderliggende knooppunten aan dergelijke knooppunten resulteert in een DOM-fout.

Eigenschappen knooppuntobject

Property Description
attributes A NamedNodeMap containing the attributes of this node (if it is an Element)
baseURI Returns the absolute base URI of a node
childNodes Returns a NodeList of child nodes for a node
firstChild Returns the first child of a node
lastChild Returns the last child of a node
nextSibling Returns the node immediately following a node
nodeName Returns the name of a node, depending on its type
nodeType Returns the type of a node
nodeValue Sets or returns the value of a node, depending on its type
ownerDocument Returns the root element (document object) for a node
parentNode Returns the parent node of a node
prefix Sets or returns the namespace prefix of a node
previousSibling Returns the node immediately before a node
textContent Sets or returns the textual content of a node and its descendants


Knooppuntobjectmethoden

Method Description
appendChild() Appends a new child node to the end of the list of children of a node
cloneNode() Clones a node
compareDocumentPosition() Compares the placement of two nodes in the DOM hierarchy (document)
getFeature(feature,version) Returns a DOM object which implements the specialized APIs of the specified feature and version
getUserData(key) Returns the object associated to a key on a this node. The object must first have been set to this node by calling setUserData with the same key
hasAttributes() Returns true if the specified node has any attributes, otherwise false
hasChildNodes() Returns true if the specified node has any child nodes, otherwise false
insertBefore() Inserts a new child node before an existing child node
isDefaultNamespace(URI) Returns whether the specified namespaceURI is the default
isEqualNode() Tests whether two nodes are equal
isSameNode() Tests whether the two nodes are the same node
lookupNamespaceURI() Returns the namespace URI associated with a given prefix
lookupPrefix() Returns the prefix associated with a given namespace URI
normalize() Puts all Text nodes underneath a node (including attribute nodes) into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes
removeChild() Removes a specified child node from the current node
replaceChild() Replaces a child node with a new node
setUserData(key,data,handler) Associates an object to a key on a node