XML- tutoriaal

XML TUIS XML Inleiding XML Hoe om te gebruik XML-boom XML-sintaksis XML elemente XML-kenmerke XML Naamruimtes XML vertoon XML HttpRequest XML-ontleder XML DOM XML XPath XML XSLT XML XQuery XML XLink XML valideerder XML DTD XML-skema XML-bediener XML voorbeelde XML Vasvra XML-sertifikaat

XML AJAX

AJAX Inleiding AJAX XMLHttp AJAX-versoek AJAX-reaksie AJAX XML-lêer AJAX PHP AJAX ASP AJAX-databasis AJAX toepassings AJAX voorbeelde

XML DOM

DOM Inleiding DOM nodusse Toegang tot DOM DOM Node Info DOM Node Lys DOM deurkruis DOM Navigeer DOM Kry waardes DOM Verander nodusse DOM Verwyder nodes DOM vervang nodusse DOM Skep nodusse DOM Voeg nodes by DOM Kloon nodusse DOM Voorbeelde

XPath handleiding

XPath Inleiding XPath nodes XPath-sintaksis XPath-asse XPath-operateurs XPath voorbeelde

XSLT- tutoriaal

XSLT Inleiding XSL-tale XSLT-transformasie XSLT <sjabloon> XSLT <waarde-van> XSLT <vir-elk> XSLT <sorteer> XSLT <if> XSLT <kies> XSLT Pas toe XSLT op die kliënt XSLT op die bediener XSLT Wysig XML XSLT voorbeelde

XQuery- tutoriaal

XQuery Inleiding XQuery voorbeeld XQuery FLWOR XQuery HTML XQuery-bepalings XQuery-sintaksis XQuery Voeg by XQuery Kies XQuery-funksies

XML DTD

DTD Inleiding DTD Boublokke DTD Elemente DTD-kenmerke DTD Elements vs Attr DTD Entiteite DTD voorbeelde

XSD- skema

XSD Inleiding XSD Hoe om XSD <skema> XSD-elemente XSD-kenmerke XSD-beperkings

XSD -kompleks

XSD-elemente XSD leeg Slegs XSD-elemente Slegs XSD-teks XSD gemeng XSD-aanwysers XSD <enige> XSD <anyAttribute> XSD-vervanging XSD voorbeeld

XSD data

XSD-string XSD datum XSD Numeries XSD Diverse XSD-verwysing

Webdienste _

XML Dienste XML WSDL XML SEEP XML RDF XML RSS

Verwysings

DOM Node Tipes DOM Node DOM NodeLys DOM NamedNodeMap DOM-dokument DOM Element DOM-kenmerk DOM teks DOM CDATA DOM Kommentaar DOM XMLHttpRequest DOM-ontleder XSLT-elemente XSLT/XPath-funksies

XML DOM Node Tipes


Die DOM bied 'n dokument aan as 'n hiërargie van nodus-objekte.


Probeer dit self - voorbeelde

Die voorbeelde hieronder gebruik die XML-lêer books.xml .

×

Opskrif


Knooptipes

Die volgende tabel lys die verskillende W3C-nodustipes, en watter nodustipes hulle as kinders mag hê:

Node Type Description Children
Document Represents the entire document (the root-node of the DOM tree) Element (max. one), ProcessingInstruction, Comment, DocumentType
DocumentFragment Represents a "lightweight" Document object, which can hold a portion of a document Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
DocumentType Provides an interface to the entities defined for the document None
ProcessingInstruction Represents a processing instruction None
EntityReference Represents an entity reference Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
Element Represents an element Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference
Attr Represents an attribute Text, EntityReference
Text Represents textual content in an element or attribute None
CDATASection Represents a CDATA section in a document (text that will NOT be parsed by a parser) None
Comment Represents a comment None
Entity Represents an entity Element, ProcessingInstruction, Comment, Text, CDATASection, EntityReference
Notation Represents a notation declared in the DTD None


Nodustipes - Terugkeerwaardes

Die volgende tabel lys wat die nodeName en die nodeValue eienskappe vir elke node tipe sal teruggee:

Node Type nodeName returns nodeValue returns
Document #document null
DocumentFragment #document fragment null
DocumentType doctype name null
EntityReference entity reference name null
Element element name null
Attr attribute name attribute value
ProcessingInstruction target content of node
Comment #comment comment text
Text #text content of node
CDATASection #cdata-section content of node
Entity entity name null
Notation notation name null

NodeTypes - Benoemde konstante

NodeType Named Constant
1 ELEMENT_NODE
2 ATTRIBUTE_NODE
3 TEXT_NODE
4 CDATA_SECTION_NODE
5 ENTITY_REFERENCE_NODE
6 ENTITY_NODE
7 PROCESSING_INSTRUCTION_NODE
8 COMMENT_NODE
9 DOCUMENT_NODE
10 DOCUMENT_TYPE_NODE
11 DOCUMENT_FRAGMENT_NODE
12 NOTATION_NODE