PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV, WINDEV Mobile 23 feature!
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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: See Declaring a variable for more details.
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

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
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.
NamespacexmlNamespace variableNamespace of node
This property is available in read-only.
NamespaceDeclaredArray of xmlNamespaceArray of XML namespaces declared by the node.
NameUnicode character stringName of node.
This property is available in read-only.
DepthIntegerDepth of current element in the XML treeview.
This property is available in read-only.
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 available in read-only.
ValueUnicode character stringValue of node.
Note: The references to an entity are automatically interpreted.
This property is available in read-only.

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment