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
Loads an XML document from a file, a URL or a string in an xmlDocument variable.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
AndroidAndroid Widget This function is available from Android version 2.2.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
AndroidAndroid Widget This function is available from Android version 2.2.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
AndroidAndroid Widget This function is available from Android version 2.2.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Load the RSS stream of the last articles published on pcsoft.fr.windev
Stream is xmlDocument
Stream = XMLOpen("http://forum.pcsoft.fr/rss.awp?groupid=pcsoft.fr.windev&v=2", fromURL)
IF ErrorOccurred = True THEN
        Error("Unable to open the RSS stream. Check your Internet connection.")
END
Syntax

Loading an XML document from a file or from a URL Hide the details

<Result> = XMLOpen(<Source of Document> [, <Type of Source>])
<Result>: xmlDocument variable
xmlDocument variable containing the result of the loading and study of XML document.
The ErrorOccurred variable is set to True if an error occurred.
<Source of Document>: Character string (with quotes)
Corresponds to:
  • the path of the file containing the XML document (for a file source).
  • the URL of XML document (for a URL source).
<Type of Source>: Optional Integer constant
Type of source to use:
fromFile<Document Source> is the path of an XML file.
fromURL<Document Source> is the URL of an XML file.

Loading an XML document contained in a string Hide the details

<Result> = XMLOpen(<XML Document>, fromString)
<Result>: xmlDocument variable
xmlDocument variable containing the result of the loading and study of XML document.
The ErrorOccurred variable is set to True if an error occurred.
<XML Document>: Character string (with quotes)
XML code to load.
<fromString>: Integer constant
Type of source to use:
fromString<XML Document> is a string containing XML code.
Remarks
The UTF-8 encoding is used by default if no encoding is specified in the XML document.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230xml.dll
Windows Mobile wp230xml.dll
Java wd230java.jar
Linux wd230xml.so
Android wd230android.jar
Minimum required version
  • Version 15
This page is also available for…
Comments
LER ITEM XML
PROCEDURE ler_danfe_itens_impostos_xml()
documento is string = EDT_Xml_nfe
xml_nfe is a xmlDocument
xml_nfe=XMLOpen(documento,fromString)
det is xmlNode
_sequencia is int=0
FOR EACH det OF xml_nfe.nfeProc.NFe.infNFe on det
TableAddLine(TABLE_itens) // Adicionando a tabela
n_ocorrencia is int= TABLE_itens..Occurrence //vou ter o numero atual linha tabela
_sequencia++
TABLE_itens.COL_01_sequencia[n_ocorrencia]=_sequencia
TABLE_itens.COL_02_id_nota_fiscal_iten[n_ocorrencia]=0
TABLE_itens.COL_03_cProd[n_ocorrencia]=det.prod.cProd
TABLE_itens.COL_04_cEAN[n_ocorrencia]=det.prod.cEAN
TABLE_itens.COL_18_ICMS_ICMSSN_orig[n_ocorrencia]=det.imposto.ICMS..ChildNode[1].orig
TABLE_itens.COL_19_ICMS_ICMSSN_CST_CSOSN[n_ocorrencia]=det.imposto.ICMS..ChildNode[1].CST

END
//=================================

AULA 1307 WINDEV XML 017 - LER ITENS NOTA NFE

http://windevdesenvolvimento.blogspot.com.br/2017/12/aula-1307-windev-xml-017-ler-itens-nota.html

https://www.yout
De matos
Dec. 15 2017