https://doc.windev.com/en-US/?1000019281&name=XMLDocument_R
https://www.youtube.com/watch?v=wfN6c0WxsWY
// ESTOU CRIANDO AS VARIAVEIS PARA PEGAR AS TAGS
// I AM CREATING THE VARIABLES TO TAG THE TAGS
// ESTOY CREANDO LAS VARIABLES PARA PEGAR LAS TAGS
EDT_RESULTADO=""
NItem is string=""
NItem_anterior is string=""
nome_tag is string=""
cProd is string=""
xProd is string=""
NCM is string=""
CFOP is string=""
uCom is string=""
vUnTrib is string=""
vProd is string=""
xPed is string=""
infAdProd 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")
CASE "xProd" :
xProd = XMLData("XML")
CASE "NCM" :
NCM = XMLData("XML")
CASE "CFOP" :
CFOP = XMLData("XML")
CASE "uCom" :
uCom = XMLData("XML")
CASE "vUnTrib" :
vUnTrib = XMLData("XML")
CASE "vProd" :
vProd = XMLData("XML")
CASE "xPed" :
xPed = XMLData("XML")
CASE "infAdProd" :
infAdProd = XMLData("XML")
END
CASE XMLAttribute
IF nome_tag="det" THEN
NItem = XMLData("XML")
IF NItem_anterior="" THEN
NItem_anterior=NItem
ELSE
mostra_xml()
END
END
END
XMLNext("XML")
END
mostra_xml()
XMLClose("XML")
INTERNAL PROCEDURE mostra_xml()
EDT_RESULTADO+=NItem+"|"+cProd+"|"+xProd+"|"+NCM+"|"+CFOP+"|"+uCom+"|"+vUnTrib+"|"+vProd+"|"+xPed+"|"+infAdProd+CR
END
sFile is string
// Opens the file picker
sFile = fSelect("", "", "Seleciona um Arquivo Xml Para Importar", "Xml" + TAB + "*.xml", "*.xml")
EDT_XML=fLoadText(sFile)
WinDev - Xml - 001/... Criar um Xml
WinDev - Xml - 002/... Ler Xml Aula 1/...
WinDev - Xml - 003/... Ler Xml Aula 2/...
WinDev - Xml - 004/... Ler Xml Aula 3
WinDev - Xml - 005/... XmlRead - Retirar Tag
WinDev - Xml - 006/... Sefaz Gratuito-Ler Xml Cliente/Gravar
WinDev - Xml - 007/... Utf8ToString
Ler Xml e Colocar Tabela - WinDev - Xml - 008/...
Ler Xml Nfe - WinDev - Xml 009
LER ITENS XML - DOCZIP MANIFESTACAO - XML 010 - AULA 1187
DESCOMPACTAR STRING - XML - MANIFESTACAO NOTA - XML 011 - AULA 1192
LER ITENS NFE XML - XML 12 - AULA 1240
RETIRAR ITEN XML - XML 15 - AULA 1255
XML LER ITENS - XML 17 AULA 1307
DICAS 1937 - PUBLICA - WINDEV - XML 018 - LER XML - XMLRead - xmldocument
LER ITENS XML-xmlOpen-xmldocument-xmlNode-DICAS 1938-PUBLICA-WINDEV-XML 019
DICAS 1937 - PUBLICA - WINDEV - XML 018 - LER XML - XMLRead - xmldocument
LER ITENS XML-xmlOpen-xmldocument-xmlNode-DICAS 1938-PUBLICA-WINDEV-XML 019
DICAS 2032 - WINDEV - XML 020 - XMLExtractString - EXTRAIR TAG
DICAS 2046 - WINDEV WEBDEV MOBILE - XML 21 - HExportXML
DICAS 2046 - WINDEV WEBDEV MOBILE - XML 21 - HExportXML