• Share
  • ?
  • Profiles ▼
  • Communities ▼
  • Apps ▼

Blogs

  • My Blogs
  • Public Blogs
  • My Updates
  • Administration
  • Log in to participate

▼ Tags

 

▼ Similar Entries

Mathias Bynens: "Asy...

Blog: HermannSW
HermannSW 2700006U54
Updated
0 people like thisLikes 0
No CommentsComments 0

Pattern Matching usi...

Blog: DB2 for z/OS ...
Jane Man 110000HG1H
Updated
0 people like thisLikes 0
No CommentsComments 0

sync_wait.js and wai...

Blog: HermannSW
HermannSW 2700006U54
Updated
0 people like thisLikes 0
No CommentsComments 0

How to generate UUID...

Blog: HermannSW
HermannSW 2700006U54
Updated
0 people like thisLikes 0
No CommentsComments 0

Part 2 : Deploy a No...

Blog: Malarvizhi K ...
Malarvizhi_Kandasamy 060000VYUA
Updated
0 people like thisLikes 0
CommentsComments 2

▼ Archive

  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • September 2018
  • March 2018
  • November 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • October 2016
  • May 2016
  • April 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011

▼ Blog Authors

HermannSW

View All Entries
Clicking the button causes a full page refresh. The user could go to the "Entry list" region to view the new content.) Entry list

Linefeed after xml-declaration causing problems on backend

HermannSW 2700006U54 | | Tags:  javascript xml gatewayscript nodejs datapower spec ‎ | 11,350 Views

First of all, there is nothing wrong with the linefeed DataPower emits after xml-declaration.

Any system not being capable to deal with that and requiring  <?xml version="1.0" encoding="UTF-8"?><…  is not XML spec compliant.

This can be fixed in DataPower with a xformbin action, but today's posting is on how to do this easily with GatewayScript.

The task is to remove just the very first linefeed (after xml declaration) and send the modified stuff to output directly.

Here you can see that it works:

$ coproc2 xml.js lx.xml http://quicksilver:2227
<?xml version="1.0" encoding="UTF-8"?><l>
1
</l>
$ 
$ cat lx.xml; echo
<?xml version="1.0" encoding="UTF-8"?>
<l>
1
</l>
$ 

 

And this is the small GatewayScript xml.js doing the job:
image

 


 

 

Hermann.

 

 

Modified on by HermannSW 2700006U54
  • Add a Comment Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry
Notify Other People
notification

Send Email Notification

+

Quarantine this entry

deleteEntry
duplicateEntry

Mark as Duplicate

  • Previous Entry
  • Main
  • Next Entry
Feed for Blog Entries | Feed for Blog Comments | Feed for Comments for this Entry