Samouczek XML

Strona główna XML Wprowadzenie do XML XML Jak używać Drzewo XML Składnia XML Elementy XML Atrybuty XML Przestrzenie nazw XML Wyświetlacz XML Żądanie HTTP XML Parser XML XML DOM XML XPath XML XSLT XML XQuery XML XLink Walidator XML XML DTD Schemat XML Serwer XML Przykłady XML Quiz XML Certyfikat XML

XML AJAX

Wprowadzenie do AJAX AJAX XMLHttp Żądanie AJAX Odpowiedź AJAX Plik XML AJAX AJAX PHP ASP AJAX Baza danych AJAX Aplikacje AJAX Przykłady AJAX

XML DOM

Wprowadzenie do DOM Węzły DOM Dostęp do DOM Informacje o węźle DOM Lista węzłów DOM Przechodzenie DOM Nawigacja DOM DOM Uzyskaj wartości Zmiana węzłów DOM DOM Usuń węzły DOM Zamień węzły DOM Utwórz węzły DOM Dodaj węzły Węzły klonowania DOM Przykłady DOM

Samouczek XPath

Wprowadzenie do XPath Węzły XPath Składnia XPath Osie XPath Operatorzy XPath Przykłady XPath

Samouczek XSLT

Wprowadzenie XSLT Języki XSL Transformacja XSLT XSLT <szablon> XSLT <wartość-z> XSLT <dla każdego> XSLT <sortuj> XSLT <jeśli> XSLT <wybierz> XSLT Zastosuj XSLT na kliencie XSLT na serwerze XSLT Edytuj XML Przykłady XSLT

Samouczek XQuery

Wprowadzenie do XQuery Przykład XQuery XQuery FLWOR XQuery HTML Warunki XQuery Składnia XQuery XQuery Dodaj XQuery Wybierz Funkcje XQuery

XML DTD

Wprowadzenie do DTD Bloki konstrukcyjne DTD Elementy DTD Atrybuty DTD Elementy DTD a Attr Jednostki DTD Przykłady DTD

Schemat XSD

Wprowadzenie do XSD XSD Jak to zrobić XSD <schemat> Elementy XSD Atrybuty XSD Ograniczenia XSD

Kompleks XSD

Elementy XSD XSD Pusty Tylko elementy XSD Tylko tekst XSD Mieszane XSD Wskaźniki XSD XSD <dowolny> XSD <dowolnyAtrybut> Zastąpienie XSD Przykład XSD

Dane XSD

XSD ciąg Data XSD Numeryczne XSD Różne XSD Odniesienie XSD

Usługi internetowe

Usługi XML XML WSDL MYDŁO XML XML RDF XML RSS

Bibliografia

Typy węzłów DOM Węzeł DOM Lista węzłów DOM DOM NamedNodeMap Dokument DOM Element DOM Atrybut DOM Tekst DOM DOM CDATA Komentarz DOM DOM XMLHttpRequest Analizator DOM Elementy XSLT Funkcje XSLT/XPath

XML DOM — obiekt Attr


Obiekt Attr

Obiekt Attr reprezentuje atrybut obiektu Element. Dopuszczalne wartości atrybutów są zwykle zdefiniowane w DTD.

Ponieważ obiekt Attr jest również Node, dziedziczy właściwości i metody obiektu Node. Jednak atrybut nie ma węzła nadrzędnego i nie jest uważany za węzeł podrzędny elementu i zwróci wartość null dla wielu właściwości węzła.

Właściwości obiektu atrybutów

Property Description
baseURI Returns the absolute base URI of the attribute
isId Returns true if the attribute is known to be of type ID, otherwise it returns false
localName Returns the local part of the name of the attribute
name Returns the name of the attribute
namespaceURI Returns the namespace URI of the attribute
nodeName Returns the name of the node, depending on its type
nodeType Returns the type of the node
nodeValue Sets or returns the value of the node, depending on its type
ownerDocument Returns the root element (document object) for an attribute
ownerElement Returns the element node the attribute is attached to
prefix Sets or returns the namespace prefix of the attribute
schemaTypeInfo Returns the type information associated with this attribute
specified Returns true if the attribute value is set in the document, and false if it's a default value in a DTD/Schema.
textContent Sets or returns the textual content of an attribute
value Sets or returns the value of the attribute