1. Roland Smith
  2. PowerBuilder
  3. Tuesday, 4 February 2020 00:16 AM UTC

I have this issue in PB 10.5 and PB 2019.

My base DataStore object has a function with the following line of code:

Return this.Object.DataWindow.Data.XML

 

The output has an extra CRLF after the xml header line and another extra one at the very end. I do not have any XML mapping set in the DataWindow object.

 

<?xml version="1.0" encoding="UTF-16LE" standalone="no"?>

<d_categories><d_categories_row><categoryid>1</categoryid><categoryname>.....

 

This isn't causing me any issues but if there is an easy way to correct this, I would like to know.

 

Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 4 February 2020 14:38 PM UTC
  2. PowerBuilder
  3. # 1

I figured it out.

The header is followed by two LF characters instead of CRLF. That is why my ReplaceAll function wasn't working.

The end of the string has a single LF, not a CRLF.

 

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Tuesday, 4 February 2020 10:16 AM UTC
  2. PowerBuilder
  3. # 2

I don't believe any easier than code looking for and replacing CRLF after the XML intro at at the end.

I had case where an external receiver app expected different XML than DW engine created - even with predefined XML mappings. I added post-process step where NVO would search+replace certain XML patterns. Like representing NULL values in certain cases or representing a sub collection (like XML from nested DW) when that collection was empty.

Your get-rid-of-excess-CRLF sounds like additional patterns to look for.

 

HTH /Michael

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.