https://youtu.be/HMm90wqnKlg
Bom Dia Boa Tarde Boa Noite
Mande um email pedido para receber todas notificaçoes dos videos 
email : amarildo.matos@gmail.com
==============================================================
Seja Membro do Canal e tenha direito a consultorias com precos diferenciados
https://www.youtube.com/channel/UCQGPHrppG5XKoRbeOIgLJEA/join
Beneficios Membros: 
     Skype Privado
     Sugerir ou pedir Videos
     Valroes de consultorias com precos acesiveis
     Pedir para eu refazer uma exemplo versao inferior
     Quero Refazer meu sistema no windev, onde comecar?
     Como fazer uma proteção on-line do seu sistema ?
     Meu projeto será grande, como devo fazer?
==============================================================
Esse Video vai estrear as 09:30 do dia 16/08/2021
DICAS 3382 - WINDEV WEBDEV MOBILE - Ler Xml do Sefaz - Itens - Codigo em Windev - Parte 13- Curso Webservice - 49
ASSUNTOS
00:00 Introducao
00:54 Criando a tabela dos itens da nota 
01:42 Vamos entrar no codigo do botao criar ler dados xml 
01:53 Vamos criar a procedure interna ler itens, e vamos chamar ela 
02:15 Vamos instanciar o xmldocument 
02:25 Vamos abrir o xml
02:48 Vamos instanciar xmlNode 
02:55 vamos eliminar os dados da tabela iten 
03:04 Vamos percorrer os itens do xml det 
03:36 vamos adicionar o iten na tabela
03:49 Vamos pegar o atributo sequencia 
04:12 vamos pegar o codigo dos produtos 
04:42 vamos pegar os outros campos 
---------------------- codigo
// XMLDocument("xml_notas",EDT_xml)
// como ja temos o xml no edt xml, vamos abrir o documento 
//XMLDocument("xml_notas",edt_xml)
XMLDocument("xml_notas",EDT_xml)
// VAMOS CRIAR PROCEDURES INTERNAS PARA MELHOR ENTENDIMENTO DO CODIGO
XML_IDE()
xml_emitente()
xml_destinatario()
xml_total()
xml_transportadora()
xml_pagamentos()
xml_informacoes()
xml_protocolo()
XMLClose("xml_notas")
ler_itens() // Vamos criar a procedure interna ler itens, e vamos chamar ela 
	INTERNAL PROCEDURE ler_itens()
		xml_nfe is xmlDocument // Vamos instanciar o xmldocument - xml_nfe is xmlDocument
		xml_nfe=XMLOpen(EDT_xml,fromString) // Vamos abrir o xml - xml_nfe=XMLOpen(EDT_xml,fromString)
		det is xmlNode // vamos instanciar xmlNode // det is xmlNode
		TableDeleteAll(TABLE_itens) // vamos eliminar os dados da tabela iten - TableDeleteAll(TABLE_itens)
		FOR EACH det OF xml_nfe.nfeProc.NFe.infNFe ON det // vamos percorrer os itens da nota 
			nOcorrencia is int=TableAddLine(TABLE_itens) // vamos adicionar o iten na tabela 
			TABLE_itens.COL_01_sequencia[nOcorrencia]=det..Attribute[1] // Vamos adicionar a sequencia pegando o atributo
			TABLE_itens.COL_02_CProd[nOcorrencia]=det.prod.cProd // vamos pegar o codigo dos produtos
			// ja aproveitei e fiz os outros campos
			TABLE_itens.COL_03_XProd[nOcorrencia]		= det.prod.xProd
			TABLE_itens.COL_04_QCom[nOcorrencia]		= det.prod.qCom
			TABLE_itens.COL_05_VUnCom[nOcorrencia]	= det.prod.vUnCom
			TABLE_itens.COL_06_VProd[nOcorrencia]		= det.prod.vProd
		END
	END
	INTERNAL PROCEDURE XML_IDE()
		EDT_Cuf			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cUF")
		EDT_CNF			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cNF")
		EDT_NatOp		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/natOp")
		EDT_Mod			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/mod")
		EDT_Serie		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/serie")
		EDT_NNF			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/nNF")
		EDT_DhEmi		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/dhEmi")
		EDT_Cuf			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cUF")
		EDT_DhSaiEnt	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/dhSaiEnt")
		EDT_TpNF		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/tpNF")
		EDT_IdDest		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/idDest")
		EDT_CMunFG		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cMunFG")
		EDT_TpImp		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/tpImp")
		EDT_TpEmis		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/tpEmis")
		EDT_CDV			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cDV")
		EDT_TpAmb		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/cUF")
		EDT_FinNFe		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/finNFe")
		EDT_IndFinal	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/indFinal")
		EDT_IndPres		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/indPres")
		EDT_ProcEmi		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/procEmi")
		EDT_VerProc		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/ide/verProc")
	END
	INTERNAL PROCEDURE xml_emitente()
		EDT_Emitente_cnpj			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/CNPJ")
		EDT_Emitente_xNome			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/xNome")
		EDT_Emitente_xFant			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/xFant")
		EDT_Emitente_xLgr			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/xLgr")
		EDT_Emitente_nro			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/nro")
		EDT_Emitente_xBairro		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/xBairro")
		EDT_Emitente_cMun			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/cMun")
		EDT_Emitente_xMun			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/xMun")
		EDT_Emitente_UF				= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/UF")
		EDT_Emitente_CEP			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/CEP")
		EDT_Emitente_cPais			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/cPais")
		EDT_Emitente_xPais			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/xPais")
		EDT_Emitente_fone			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/enderEmit/fone")
		EDT_Emitente_IE				= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/IE")
		EDT_Emitente_CRT			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/emit/CRT")
	END
	INTERNAL PROCEDURE xml_destinatario()
		EDT_Destinatario_cnpj			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/CNPJ")
		EDT_Destinatario_xNome			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/xNome")
		EDT_Destinatario_xFant			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/xFant")
		EDT_Destinatario_xLgr			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/xLgr")
		EDT_Destinatario_nro			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/nro")
		EDT_Destinatario_xBairro		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/xBairro")
		EDT_Destinatario_cMun			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/cMun")
		EDT_Destinatario_xMun			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/xMun")
		EDT_Destinatario_UF				= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/UF")
		EDT_Destinatario_CEP			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/CEP")
		EDT_Destinatario_cPais			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/cPais")
		EDT_Destinatario_xPais			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/xPais")
		EDT_Destinatario_fone			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/enderDest/fone")
		EDT_Destinatario_IE				= XMLRead("xml_notas","/nfeProc/NFe/infNFe/dest/IE")
	END
	INTERNAL PROCEDURE xml_total()
		EDT_Total_vBC			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vBC")
		EDT_Total_vICMS			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vICMS")
		EDT_Total_vICMSDeson	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vICMSDeson")
		EDT_Total_vFCP			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vFCP")
		EDT_Total_vBCST			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vBCST")
		EDT_Total_vST			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vST")
		EDT_Total_vFCPST		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vFCPST")
		EDT_Total_vFCPSTRet		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vFCPSTRet")
		EDT_Total_vProd			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vProd")
		EDT_Total_vFrete		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vFrete")
		EDT_Total_vSeg			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vSeg")
		EDT_Total_vDesc			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vDesc")
		EDT_Total_vII			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vII")
		EDT_Total_vIPI			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vIPI")
		EDT_Total_vIPIDevol		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vIPIDevol")
		EDT_Total_vPIS			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vPIS")
		EDT_Total_vCOFINS		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vCOFINS")
		EDT_Total_vOutro		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vOutro")
		EDT_Total_vNF			= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vNF")
		EDT_Total_vTotTrib		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/total/ICMSTot/vTotTrib")
	END
	INTERNAL PROCEDURE xml_transportadora()
		EDT_Transportadora_modFrete	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/transp/modFrete")
		EDT_Transportadora_qVol	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/transp/vol/qVol")
		EDT_Transportadora_nVol	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/transp/vol/nVol")
	END
	INTERNAL PROCEDURE xml_pagamentos()
		EDT_Pagamento_indPag	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/pag/detPag/indPag")
		EDT_Pagamento_tPag		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/pag/detPag/tPag")
		EDT_Pagamento_vPag		= XMLRead("xml_notas","/nfeProc/NFe/infNFe/pag/detPag/vPag")
	END
	INTERNAL PROCEDURE xml_informacoes()
		EDT_Informacoes_infAdic	= XMLRead("xml_notas","/nfeProc/NFe/infNFe/infAdic/infCpl")
	END
	INTERNAL PROCEDURE xml_protocolo()
		EDT_Protocolo_tpAmb		= XMLRead("xml_notas","/nfeProc/protNFe/infProt/tpAmb")
		EDT_Protocolo_verAplic	= XMLRead("xml_notas","/nfeProc/protNFe/infProt/verAplic")
		EDT_Protocolo_chNFe		= XMLRead("xml_notas","/nfeProc/protNFe/infProt/chNFe")
		EDT_Protocolo_dhRecbto	= XMLRead("xml_notas","/nfeProc/protNFe/infProt/dhRecbto")
		EDT_Protocolo_nProt		= XMLRead("xml_notas","/nfeProc/protNFe/infProt/nProt")
		EDT_Protocolo_digVal	= XMLRead("xml_notas","/nfeProc/protNFe/infProt/digVal")
		EDT_Protocolo_cStat		= XMLRead("xml_notas","/nfeProc/protNFe/infProt/cStat")
		EDT_Protocolo_xMotivo	= XMLRead("xml_notas","/nfeProc/protNFe/infProt/xMotivo")
		//<nfeProc versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe">
		//<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
		//<protNFe versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe">
		//<infProt>
		//<tpAmb>2</tpAmb>
		//<verAplic>RS202107191616</verAplic>
		//<chNFe>43210709402019000139550010000008521131416890</chNFe>
		//<dhRecbto>2021-07-27T08:36:59-03:00</dhRecbto>
		//<nProt>143210000536388</nProt>
		//<digVal>91Hp23eTY1P/m3etky9z9tdY6d0=</digVal>
		//<cStat>100</cStat>
		//<xMotivo>Autorizado o uso da NF-e</xMotivo>
		//</infProt>
		//</protNFe>
	END
--------------------- Indice WebService
Criar Projeto WebService - Lista Site - - WebService - 001/...
Deploy - Gerando WebService/Levando Servidor/Instalar/Mostrar - WebService - 002/...
Instalando SoapUI - Testar WebService - Aula 1040 - WebService - 003/...
Ajustando Xml Lista Site WebService - WebService - 004/...
Consumir WebService - WebService - 005
Xml - Consumir Ler Xml e colocar Tabela - WebService - 006
Dolar - Consumir WebService - Cotação Dolar - 007
Cnpj Receita - Consumir WebService - 008/...
Cep Buscar WebService Correio - WebService - 009/...
CONSULTA CADASTRO SEFAZ P-1 - DICAS 1871 - WINDEV_23 - WEBSERVICE 010 -
CONSULTA CADASTRO SEFAZ P-2 - 1872 - PUBLICA - WINDEV_23 - WEBSERVICE 011 -
CONSULTA CADASTRO SEFAZ P-3 - 1873 - PUBLICA - WINDEV_23 - WEBSERVICE 012 -
DICAS 1877 - WINDEV_23 - WEBSERVICE 014 - CNPJ BUSCA CADASTRO ACBR
DICAS 2019 - WINDEV - WEBSERVICE - 015 - APRENDER A FAZER REST WEBSERVICE
DICAS 2020 - WINDEV - WEBSERVICE - 016 - CRIANDO TABELAS
DICAS 2021 - WINDEV - WEBSERVICE - 017 - WDTESTREST
DICAS 2022 - WINDEV MOBILE - WEBSERVICE - 018 - LER WEBSERVICE RESTSend
DICAS 2023 - WINDEV MOBILE - WEBSERVICE - 019 - LER WEBSERVICE RESTSend SOMENTE 1 REGISTRO
DICAS 2024 - WINDEV MOBILE - WEBSERVICE - 020 - WEBSERVICE RESTSend CRIA NOVO REGISTRO - httpPost
DICAS 2025 - WINDEV MOBILE - WEBSERVICE - 021 - WEBSERVICE RESTSend ALTERA REGISTRO - httpPut
DICAS 2026 - WINDEV MOBILE - WEBSERVICE - 022 - WEBSERVICE httpRequest httpDelete
DICAS 2033 - WINDEV - WEBSERVICE 23 - HTTPRequest - HTTPGetResult - fSaveBuffer - BAIXAR ARQUIVO
AO VIVO-SOAP-DICA 2095-WINDEV MOBILE WEBDEV-WEBSERVICE COM MOBILE -
DICAS 2096-2095 - WINDEV WEBDEV MOBILE - WEBSERVICE 25 - SOAP
DICAS 2097 - WINDEV MOBILE - WEBSERVICE 26 - MOSTRAR CLIENTES - SOAP
DICAS 2132 - HANGOUT AO VIVO 20 HORAS 30/05 - WEBSERVICE SOAP COM MOBILE
DICAS 2163 WINDEV WEBDEV MOBILE WEBSERVICE 28 SOAP
DICAS 2226 WINDEV WEBDEV MOBILE 24 NOVIDADES 26 WEBSERVICE 29 HTTPREQUEST - BUSCA CNPJ
DICA 2687 - WINDEV WEBDEV MOBILE - WEBSERVICE 32 - EXPLICANDO WEBSERVICE SOAP E CONSUMIDO MOBILE E DESKTOP
------------------- 
Bom Dia Boa Tarde Boa Noite
Mande um email pedido para receber todas notificaçoes dos videos 
email : amarildo.matos@gmail.com
==============================================================
Seja Membro do Canal e tenha direito a consultorias com precos diferenciados
https://www.youtube.com/channel/UCQGPHrppG5XKoRbeOIgLJEA/join
Beneficios Membros: 
     Skype Privado
     Sugerir ou pedir Videos
     Valroes de consultorias com precos acesiveis
     Pedir para eu refazer uma exemplo versao inferior
     Quero Refazer meu sistema no windev, onde comecar?
     Como fazer uma proteção on-line do seu sistema ?
     Meu projeto será grande, como devo fazer?
==============================================================
Esse Video vai estrear as 10:00 do dia 24/06/2021
DICAS 3358 - WINDEV WEBDEV MOBILE - Modificar o Estilo Controle e Gravar como um Estilo Webdev - Aula Top - CURSO WEBDEV 97 - estilo 1
ASSUNTOS
