ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • Properties specific to xmlReader variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The xmlReader type is used to read an XML document without loading it in memory. The characteristics of this XML document can be read by several WLanguage properties.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
MonNoeud is xmlNode
MonNoeud..Type = XMLTag
MonNoeud..Name = "MonNoeud"
MonNoeud..Text = "Le texte du noeud"

Lecteur is xmlReader = XMLOpenReader("fichier.xml")

FOR EACH Lecteur EN PROFONDEUR
	Trace(Lecteur.Type)
END

VariableReset(Lecteur) // Fermeture du fichier

Lecteur2 is xmlReader = XMLOpenReader("fichier.xml")

FOR EACH x OF Lecteur2
	IF Lecteur2.Type = XMLReaderStartTag _OR_ Lecteur2.Type = XMLReaderEmptyElementTag THEN
		IF Lecteur2.Name = "config" THEN
			FOR EACH y OF x
				Trace(x.Nom)
			END
		END
	END
END

VariableReset(Lecteur2) // Fermeture du fichier
Properties

Properties specific to xmlReader variables

The following properties can be used to handle an XML document:
Property nameType usedEffect
AttributeArray of xmlAttributeArray of XML attributes associated with the node.
DepthIntegerDepth of current element in the XML treeview.
This property is read-only.
NameUnicode stringName of node.
This property is read-only.
NamespacexmlNamespace variableNamespace of node
This property is read-only.
NamespaceDeclaredArray of xmlNamespaceArray of XML namespaces declared by the node.
TypeIntegerType of XML node:
  • XMLReaderNo: Current element does not correspond to a node.
  • XMLLecteurBaliseDébut Start of tag.
  • XMLLecteurBaliseFin End of tag.
  • XMLLectorEmptyTag: Empty tag.
  • XMLLecteurCDATA CDATA section.
  • XMLReaderComments Comments.
  • XMLReaderEntity Declaration of an entity.
  • XMLLecteurUnknown Type unknown.
  • XMLLecteurProcessingInstruction Processing instruction
  • XMLReaderReferenceEntity: Reference to an entity.
  • XMLReaderText Text.
  • XMLReaderTypeDocument DOCTYPE declaration.
This property is read-only.
ValueUnicode stringValue of node.
Note: References to an entity are automatically interpreted..
This property is read-only.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help