Hi all
In this years, i have used CGIDEV2 (as descripted at
www.mcpressonline.com/programming-other/general/play-time-productive-time
<
http://www.mcpressonline.com/programming-other/general/play-time-productive
-time> ) for generating Xml with RPG; as i would need to generate XML on
V5R4 or al least at V6R1, i would like to know if with XMLi or PowerEXT i
can solve the problem not to pass/write the empty tags;
Example (using CGIDEV2)
In my template i have:
/$SedeCES
<Sede>
<Indirizzo>/%Indirizzo%/</Indirizzo>
<NumeroCivico>/%NumeroCivico%/</NumeroCivico>
<CAP>/%CAP%/</CAP>
<Comune>/%Comune%/</Comune>
<Provincia>/%Provincia%/</Provincia>
<Nazione>/%Naz%/</Nazione>
</Sede>
When my variable ?NumeroCivico? è blank in my Xml i will find:
<Sede>
<Indirizzo>Via del Corso</Indirizzo>
<NumeroCivico></NumeroCivico>
<CAP>00100</CAP>
<Comune>ROMA</Comune>
<Provincia>RM</Provincia>
<Nazione>IT</Nazione>
</Sede>
And clearly this is not good ?.as in the <NumeroCivico> there is no value
The simplest way to solve the problem with CGIDEV2 is to change Xml template
like this:
/$SedeCES
<Sede>
<Indirizzo>/%Indirizzo%/</Indirizzo>
/$NumeroCivicoCES
<NumeroCivico>/%NumeroCivico%/</NumeroCivico>
/$SedeCESContinua
<CAP>/%CAP%/</CAP>
<Comune>/%Comune%/</Comune>
<Provincia>/%Provincia%/</Provincia>
<Nazione>/%Naz%/</Nazione>
</Sede>
And add in my RPG :
If NumeroCivico <> *Blank;
WrtSection('NumeroCivicoCES');
Endif
The same thing could be for CAP or Comune and in this way , it would be a
proliferate of IF cond and "WrtSection". It would be nice and helpful to say
not write empty tags in Xml ..
My questione now is:
with XMLi or PowerEXT , can i solve/avoid this problem with more ease ?
Any suggestions will appreciated
Thanks in advance
---
Questa e-mail è stata controllata per individuare virus con Avast antivirus.
https://www.avast.com/antivirus
As an Amazon Associate we earn from qualifying purchases.