Tutoriel XML

ACCUEIL XML Introduction XML XML Comment utiliser Arbre XML Syntaxe XML Éléments XML Attributs XML Espaces de noms XML Affichage XML Requête HTTP XML Analyseur XML DOM XML XPath XML XML XSLT XQuery XML XMLXLink Validateur XML DTD XML Schéma XML Serveur XML Exemples XML XML Quiz Certificat XML

XMLAJAX

Présentation d'AJAX AJAX XMLHttp Requête AJAX Réponse AJAX Fichier XML AJAX PHP AJAX ASP AJAX Base de données AJAX Applications AJAX Exemples AJAX

DOM XML

Présentation du DOM Nœuds DOM Accès au DOM Informations sur le nœud DOM Liste des nœuds DOM Traversée du DOM Navigation DOM DOM Obtenir des valeurs Nœuds de changement DOM DOM Supprimer les nœuds DOM Remplacer les nœuds DOM Créer des nœuds DOM Ajouter des nœuds Nœuds de clonage DOM Exemples DOM

Tutoriel XPath

Présentation de XPath Nœuds XPath Syntaxe XPath Axes XPath Opérateurs XPath Exemples XPath

Tutoriel XSLT

Présentation de XSLT Langages XSL Transformation XSLT XSLT <modèle> XSLT <valeur-de> XSLT <pour-chaque> XSLT <sort> XSLT <si> XSLT <choisir> Appliquer XSLT XSLT sur le client XSLT sur le serveur XSLT Éditer XML Exemples XSLT

Tutoriel XQuery

Présentation de XQuery Exemple XQuery XQuery FLWOR XQuery HTML Termes XQuery Syntaxe XQuery Ajouter XQuery Sélection XQuery Fonctions XQuery

DTD XML

Présentation de la DTD Blocs de construction DTD Éléments DTD Attributs DTD Éléments DTD vs Attr Entités DTD Exemples de DTD

Schéma XSD

Présentation XSD Comment XSD XSD <schéma> Éléments XSD Attributs XSD Restrictions XSD

Complexe XSD

Éléments XSD XSD vide Éléments XSD uniquement Texte XSD uniquement XSD Mixte Indicateurs XSD XSD <tout> XSD <anyAttribute> Remplacement XSD Exemple XSD

Données XSD

Chaîne XSD Date XSD Numérique XSD Divers XSD Référence XSD

Services Web

Services XML XMLWSDL SAVON XML XML RDF XML RSS

Les références

Types de nœuds DOM Nœud DOM Liste de nœuds DOM DOM NamedNodeMap Documents DOM Élément DOM Attribut DOM Texte DOM DOM CDATA DOM Comment DOM XMLHttpRequest Analyseur DOM Éléments XSLT Fonctions XSLT/XPath

XML DOM - L' objet Attr


L'objet Attr

L'objet Attr représente un attribut d'un objet Element. Les valeurs autorisées pour les attributs sont généralement définies dans une DTD.

Comme l'objet Attr est également un Node, il hérite des propriétés et des méthodes de l'objet Node. Cependant, un attribut n'a pas de nœud parent et n'est pas considéré comme un nœud enfant d'un élément, et renverra null pour la plupart des propriétés Node.

Propriétés de l'objet Attr

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