ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / XML file functions
  • 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
MyNode is xmlNode
MyNode..Type = XMLTag
MyNode..Name = "MyNode"
MyNode..Text = "Text of node"
 
Reader is xmlReader = XMLOpenReader("file.xml")
 
FOR EACH Reader IN-DEPTH
Trace(Reader.Type)
END
 
VariableReset(Reader) // Close file
 
Reader2 is xmlReader = XMLOpenReader("file.xml")
 
FOR EACH x OF Reader2
IF Reader2.Type = XMLReaderStartTag _OR_ Reader2.Type = XMLReaderEmptyElementTag THEN
IF Reader2.Name = "config" THEN
FOR EACH y OF x
Trace(x.Name)
END
END
END
END
 
VariableReset(Reader2) // Close file
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

Last update: 01/12/2023

Send a report | Local help