0
Votes
Undo
  1. Alain NYSSEN
  2. PowerBuilder
  3. Friday, 21 August 2020 13:34 PM UTC

in XML template how to remove automatically empty elements ?

Thanks

Alain NYSSEN Accepted Answer Pending Moderation
  1. Monday, 24 August 2020 15:46 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

thanks for your response

1) Do you want to do this when creating or reading the XML data stream? Yes

2) Are you using a DataWindow or PBDOM to interact with the XML data stream? Datawindow

3) If you using a DW - what import / export mechanism are you using?

Tab : DataExport

Property : XML format

Use Template : <Own_template>

See example below :

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 August 2020 16:04 PM UTC
  2. PowerBuilder
  3. # 2

Hi Alain;

  Can you tell us ...

1) Do you want to do this when creating or reading the XML data stream?

2) Are you using a DataWindow or PBDOM to interact with the XML data stream?

3) If you using a DW - what import / export mechanism are you using?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 25 August 2020 19:01 PM UTC
Hi Alain;



Since your using the DWO's built-in XML feature set. After the DWO Export to XML, you will have to parse out the XML yourself by re-reading the exported XML file using the FileRead(), POS(), Replace() & FileWrite () commands or read the exported file back in using the PBDOM feature to parse out the extraneous datum. Then write the cleaned-up XML file back to disk..



Regards ... Chris
  1. Helpful
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.