Quitar espacios en blanco en un xml

90 views
Skip to first unread message

Julián May

unread,
Jul 28, 2016, 3:35:03 PM7/28/16
to Comunidad de Visual Foxpro en Español
Buen día colegas. 
Ya he intentado de varias maneras de quitar los espacios en blanco al inicio de un xml eh visto por aquí por el foro y nada mas no me funciona lo que hago.
No se si ando omitiendo algo
Aquí tengo parte del código y el xml saludos.

       procedure SaveConfiguration 
local lcXml as String, lcFile as String  
lcXml = ""
lcFile = ""
text to lcXML additive textmerge noshow 
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dataorigin><<alltrim(this.DataOrigin)>></dataorigin>
<datadestination><<alltrim(this.DataDestination)>></datadestination>
<reportsroute><<alltrim(this.ReportsRoute)>></reportsroute>
</configuration>
endtext
= strtofile("", "Configuration.xml") 
= strtofile(lcXML, "Configuration.xml")
lcFile = filetostr("Configuration.xml")
lcFile = strtran(lcFile, chr(13) + chr(10), "")
lcFile = Asc2UTF8(lcFile)
= strtofile(lcFile, "Configuration.xml")
endproc  


Configuration.xml

francisco prieto

unread,
Jul 28, 2016, 3:41:38 PM7/28/16
to Comunidad de Visual Foxpro en Español
Julian,

suponiendo que trabajas con VFP7 en adelante podes poner

text to lcXML additive textmerge noshow PRETEXT 3

por ejemplo...

https://msdn.microsoft.com/en-US/library/94ctt960(v=vs.80).aspx

Saludos,

Pancho
Córdoba
Argentina

Julián May

unread,
Jul 28, 2016, 4:09:07 PM7/28/16
to Comunidad de Visual Foxpro en Español
Muchas gracias Francisco, gracias por el link de la documentación.
era el PRETEXT que me faltaba.

Gracias por la ayuda. 
Saludos.

Julián May.
Reply all
Reply to author
Forward
0 new messages