1. carlos efrain
  2. PowerBuilder
  3. Tuesday, 25 July 2017 10:53 AM UTC

Buena a todos

 

Como codria  para importar un archivo en formato XML a power builder a 12. 5

 

 

Atentamente

Carlos Pizan Jacome

Accepted Answer
Rodolfo Reyes Accepted Answer Pending Moderation
  1. Tuesday, 25 July 2017 17:46 PM UTC
  2. PowerBuilder
  3. # Permalink

La forma mas sencilla es creando una DataWindow o DataStore que tenga la misma estructura que el XML, luego con la propiedad import de la DataWindow o DataStore puedes importar el XML, y ya lo tienes cargado a memoria para poder utilizar los datos.

 

Para crear la DataWindow, tienes que crearla manualmente, creando los campos que coincidan con la estrucutura del XML.

 

=====================

Rodolfo Daniel Reyes

=====================

Comment
There are no comments made yet.
Bruce Armstrong Accepted Answer Pending Moderation
  1. Tuesday, 25 July 2017 13:59 PM UTC
  2. PowerBuilder
  3. # 1

If the data in the XML is relatively flat you can create a DataWindow with the matching data structure and then create an XML template in the datawindow that maps the xml tags to the columns in the datawindow.  You can then do an import on the file.

That only works for relatively simple XML though.  While the DataWindow can be structure to handled nested data it can only export that, not import it.  If the XML is not farily simple you would need to look at PBDOM (http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc37774.1250/html/apptech/BABCHEHD.htm) to parse the xml and then put it in the datawindow.

Comment
There are no comments made yet.
Ashutosh Varshney Accepted Answer Pending Moderation
  1. Tuesday, 25 July 2017 13:42 PM UTC
  2. PowerBuilder
  3. # 2

It depends on how simple or complex your xml is. You could create a matching datawindow and then import your xml using the ImportFile function. You could also use MSXML or PBDOM. 

See if this helps: https://answers.sap.com/questions/37358/index.html

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.