دروس XML

الصفحة الرئيسية لـ XML مقدمة XML كيفية استخدام XML شجرة XML بناء جملة XML عناصر XML سمات XML مساحات أسماء XML عرض XML طلب XML HttpRequest محلل XML XML DOM XML XPath XML XSLT XML XQuery XML XLink مدقق XML XML DTD مخطط XML خادم XML أمثلة XML مسابقة XML شهادة XML

XML AJAX

مقدمة أجاكس أجاكس XMLHttp طلب AJAX استجابة AJAX ملف AJAX XML أجاكس بي إتش بي أجاكس آسيا والمحيط الهادئ قاعدة بيانات أجاكس تطبيقات أجاكس أمثلة AJAX

XML DOM

مقدمة حول DOM عقد DOM الوصول إلى DOM معلومات عقدة DOM قائمة عقدة DOM عبور DOM التنقل في DOM DOM احصل على القيم DOM تغيير العقد DOM إزالة العقد استبدل DOM Nodes DOM إنشاء العقد DOM أضف العقد عقد استنساخ DOM أمثلة DOM

دروس XPath

مقدمة XPath عقد XPath بناء جملة XPath محاور XPath مشغلي XPath أمثلة XPath

XSLT التعليمي

XSLT مقدمة لغات XSL تحويل XSLT XSLT <template> XSLT <قيمة> XSLT <للجميع> XSLT <ترتيب> XSLT <if> XSLT <اختر> XSLT تطبيق XSLT على العميل XSLT على الخادم XSLT تحرير XML أمثلة XSLT

XQuery تعليمي

XQuery مقدمة مثال XQuery XQuery FLWOR XQuery HTML شروط XQuery بناء جملة XQuery XQuery إضافة XQuery حدد وظائف XQuery

XML DTD

مقدمة DTD مكعبات بناء DTD عناصر DTD سمات DTD عناصر DTD مقابل Attr كيانات DTD أمثلة DTD

مخطط XSD

مقدمة XSD XSD كيف XSD <المخطط عناصر XSD سمات XSD قيود XSD

مجمع XSD

عناصر XSD XSD فارغ عناصر XSD فقط نص XSD فقط XSD مختلط مؤشرات XSD XSD <أي> XSD <أي سمة> تبديل XSD مثال XSD

بيانات XSD

سلسلة XSD تاريخ XSD XSD الرقمية XSD متفرقات مرجع XSD

خدمات الويب

خدمات XML XML WSDL صابون XML XML RDF XML RSS

مراجع

أنواع عقدة DOM عقدة DOM قائمة عقدة DOM DOM NamedNodeMap مستند DOM عنصر DOM سمة DOM نص DOM DOM CDATA تعليق DOM DOM XMLHttpRequest محلل DOM عناصر XSLT وظائف XSLT / XPath

XML DOM - كائن العقدة


كائن العقدة

يمثل كائن العقدة عقدة واحدة في شجرة الوثيقة.

يمكن أن تكون العقدة عقدة عنصر ، أو عقدة سمة ، أو عقدة نصية ، أو أي نوع آخر من أنواع العقد الموضحة في فصل أنواع العقدة .

لاحظ أنه بينما ترث جميع الكائنات خصائص / طرق Node للتعامل مع الوالدين والأطفال ، لا يمكن أن يكون لكل الكائنات آباء أو أطفال. على سبيل المثال ، قد لا تحتوي العقد النصية على توابع ، ويؤدي إضافة العناصر الفرعية إلى هذه العقد إلى حدوث خطأ DOM.

خصائص كائن العقدة

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


طرق كائن العقدة

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