PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of xmlReader variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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.
Remark: 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
Remarks

Properties specific to the description of 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:
  • XMLReaderNone: The current element does not correspond to a node.
  • XMLReaderStartTag: Start of tag.
  • XMLReaderEndTag: End of tag.
  • XMLReaderEmptyElementTag: Empty tag.
  • XMLReaderCDATA: CDATA section.
  • XMLReaderComment: Comments.
  • XMLReaderEntity: Entity declaration.
  • XMLReaderUnknown: Unknown type.
  • XMLReaderProcessingInstruction: Processing statement
  • XMLReaderEntityReference: Reference to an entity.
  • XMLReaderText: Text.
  • XMLReaderDocumentType: DOCTYPE declaration.
This property is read-only.
ValueUnicode stringValue of node.
Remark: The 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