PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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 xmlDocument keyword can correspond to:
  • the XMLDocument function that is used to create a new XML document. See XMLDocument for more details.
  • an xmlDocument variable. See xmlDocument for more details.
Minimum required version
  • Version 15
This page is also available for…
Comments
XML - ITENS - LER
EDT_RESULTADO=""
NItem is string=""
NItem_anterior is string=""
nome_tag is string=""
cProd is string=""
XMLDocument("XML",EDT_XML)
XMLFind("XML",Null,XMLContinue+XMLChildItem)
WHILE XMLFound("XML")
SWITCH XMLElementType("XML")
CASE XMLTag :
nome_tag = XMLElementName("XML")
SWITCH nome_tag
CASE "cProd" :
cProd = XMLData("XML")
END
CASE XMLAttribute
IF nome_tag="det" THEN
NItem = XMLData("XML")
IF NItem_anterior="" THEN
NItem_anterior=NItem
ELSE
EDT_RESULTADO+=NItem+"|"+cProd+"|"+CR
END
END
END
XMLNext("XML")
END
EDT_RESULTADO+=NItem+"|"+cProd+"|"+CR
XMLClose("XML")

// blog com vídeo e exemplo

http://windevdesenvolvimento.blogspot.com/2017/08/aula-1240-windev-xml-012-itens.html

https://www.youtube.com/watch?v=wfN6c0WxsWY

De matos
Aug. 16 2017