دروس 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 - كائن المستند


يمثل كائن المستند مستند XML بأكمله.


كائن مستند XML

كائن المستند هو جذر شجرة مستند XML ، ويمنحنا الوصول الأساسي إلى بيانات المستند.

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

خصائص كائن المستند

Property Description
childNodes Returns a NodeList of child nodes for the document
doctype Returns the Document Type Declaration associated with the document
documentElement Returns the root node of the document
documentURI Sets or returns the location of the document
domConfig Returns the configuration used when normalizeDocument() is invoked
firstChild Returns the first child node of the document
implementation Returns the DOMImplementation object that handles this document
inputEncoding Returns the encoding used for the document (when parsing)
lastChild Returns the last child node of the document
nodeName Returns the name of a node (depending on its type)
nodeType Returns the node type of a node
nodeValue Sets or returns the value of a node (depending on its type)
xmlEncoding Returns the XML encoding of the document
xmlStandalone Sets or returns whether the document is standalone
xmlVersion Sets or returns the XML version of the document

أساليب كائن الوثيقة

Method Description
adoptNode(sourcenode) Adopts a node from another document to this document, and returns the adopted node
createAttribute(name) Creates an attribute node with the specified name, and returns the new Attr object
createAttributeNS(uri,name) Creates an attribute node with the specified name and namespace, and returns the new Attr object
createCDATASection() Creates a CDATA section node
createComment() Creates a comment node
createDocumentFragment() Creates an empty DocumentFragment object, and returns it
createElement() Creates an element node
createElementNS() Creates an element node with a specified namespace
createEntityReference(name) Creates an EntityReference object, and returns it
createProcessingInstruction(target,data) Creates a ProcessingInstruction object, and returns it
createTextNode() Creates a text node
getElementById(id) Returns the element that has an ID attribute with the given value. If no such element exists, it returns null
getElementsByTagName() Returns a NodeList of all elements with a specified name
getElementsByTagNameNS() Returns a NodeList of all elements with a specified name and namespace
importNode(nodetoimport,deep) Imports a node from another document to this document. This method creates a new copy of the source node. If the deep parameter is set to true, it imports all children of the specified node. If set to false, it imports only the node itself. This method returns the imported node
normalizeDocument()  
renameNode() Renames an element or attribute node


خصائص كائن DocumentType

يحتوي كل مستند على سمة DOCTYPE تكون قيمتها إما فارغة أو كائن DocumentType.

يوفر كائن DocumentType واجهة للكيانات المعرفة لمستند XML.

Property Description
name Returns the name of the DTD
publicId Returns the public identifier of the DTD
systemId Returns the system identifier of the external DTD

أساليب كائن تنفيذ الوثيقة

ينفذ كائن DOMImplementation عمليات مستقلة عن أي مثيل معين لنموذج كائن المستند.

Method Description
createDocument(nsURI, name, doctype) Creates a new DOM Document object of the specified doctype
createDocumentType(name, pubId, systemId) Creates an empty DocumentType node
getFeature(feature, version) Returns an object which implements the APIs of the specified feature and version, if the is any
hasFeature(feature, version) Checks whether the DOM implementation implements a specific feature and version

معالجة خصائص كائن التعليمات

يمثل كائن ProcessingInstruction تعليمات معالجة.

يتم استخدام تعليمات المعالجة كطريقة للاحتفاظ بالمعلومات الخاصة بالمعالج في نص مستند XML.

Property Description
data Sets or returns the content of this processing instruction
target Returns the target of this processing instruction