Creates a reader used to read an XML document without loading it in memory.
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
Syntax
<Result> = XMLOpenReader(<File>)
<Result>: xmlReader variable
xmlReader variable used to read an XML document without loading it in memory.
<File>: Character string
Path of file containing the XML document to read.
Remarks
- This function is used to read large XML files. To read small XML files, use XMLOpen.
- Closing the player: The VariableReset function applied to the Variable of type xmlReader allows to close the manipulated XML file (see example).
Business / UI classification: Business Logic