2
Good morning gentlemen, I’m having a hard time reading some XML fields. For example, I am developing a sales software and at the time of reading the XML for printing it is pulling only one item instead of all. The XML itself has 3 items but when I have the printer printed, only 1. Below is the structure of my code in VB.NET, who can help me I will be immensely grateful.
/Lendo o Xml
Dim produto As New BindingSource
produto.DataSource = ds
produto.DataMember = "det"
produto.DataMember = "prod"
Dim descricao As String = produto.Current("xProd").ToString()
Dim quantidade As String = produto.Current("qCom").ToString()
Dim valorprod As String = produto.Current("vProd").ToString()
/Imprimindo o XML
escreve.Write("# Descricao Qtde X Preco Total" & vbNewLine)
escreve.Write("------------------------------------------------" + vbNewLine)
escreve.Write("" + descricao + " " + quantidade + " X " + valorprod + " " + valorprod & vbNewLine & vbNewLine)
Can you see the XML structure? An example?
– Sérgio Sereno
<det nItem="1">
<prod>
<cProd>7898577370182</cProd>
<xProd>J.WATANABE/COUVE MANTE</xProd> 
</prod> 
<det nItem="2">
<prod>
<cProd>66396</cProd>
<xProd>BULK/GARLIC KG</xProd> </Prod> </det>
– Dev
Matheus, there are several examples of XML with VB.Net in Vbmania... have you tried running any? Please punctuate me on the other topic I helped you with the Epson TM T20 printer?
– FabioIn