Link to home
Start Free TrialLog in
Avatar of Ernesto
ErnestoFlag for Mexico

asked on

display XML in vb Form

Hi all
In Mexico the invoices come in xml,
how do i made a visualizor in VB.NET who allow the users visualize the data may be in a windows form
is any way to achive that
tsm you experts
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Hi  edo60;

Parse the XML document to retrieve the elements of the document and place them in to text boxes.

You will need to know all the possible elements that can be in the document and which elements can sometimes not show up in it.
Well what do you mean by "visualize"? If you just want to display the XML itself, you could use the WebBrowser control.
Avatar of Ernesto

ASKER

yes display,
but some order, only the data that is important, not the xml syntax
regards
@edo60;

To your statement, "But some order, only the data that is important, not the XML syntax", well then you need to do what I stated in my first post. Without a sample XML file we can not be more specific.
Avatar of Ernesto

ASKER

Fernando,
All the XML that contain invoices has the same structure that is.
1667-0.xml
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ernesto

ASKER

fernando, the output for the code is a windows form?
in need to paste the code in the form_load section?
regards
Avatar of Ernesto

ASKER

i have an error in here

 Dim results = From node In xdoc.Root.Elements()

Error      22      No se puede consultar una expresión de tipo 'System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)'. Compruebe que no falta ninguna referencia de ensamblado ni ninguna importación de espacio de nombres para el proveedor LINQ.
It is code that will work in a win form application.

I do not read Spanish so please translate error statement when posting.

Did you add the Imports statement as shown in the first code snippet?
Avatar of Ernesto

ASKER

Ok fernando, the error were:

Error      22      No se puede consultar una expresión de tipo 'System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)'. Compruebe que no falta ninguna referencia de ensamblado ni ninguna importación de espacio de nombres para el proveedor LINQ.

Can not consult an expression from the type  'System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)' be sure that not reference is missing also no space importation of names for the LINQ providor
Did you add the following line to the code file at the top?

Imports System.Xml.Linq