ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Create Atribute after Prolog

Post new topic  Reply to topic
 Create Atribute after Prolog « View previous topic :: View next topic » 
Author Message
Gama
PostPosted: Wed Mar 10, 2021 8:55 am    Post subject: Create Atribute after Prolog Reply with quote

Centurion

Joined: 11 Jan 2005
Posts: 103
Location: Portugal

Hi,

I need to create the follow structure in bold after XML Prolog with ESQL

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?wilogs-api modele="xxxxx.xml"?>
<DT_WMS-MCN>
<DT_GRP>
.
.
.
</DT_GRP>
</DT_WMS-MCN>

To create the prolog is simple:

SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration) = '';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)standalone = 'no';

And the <?wilogs-api modele="xxxxx.xml"?> ????

Any suggestion will be appreciated.

Bes regards
Gama
Back to top
View user's profile Send private message
timber
PostPosted: Wed Mar 10, 2021 5:38 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

That's not an attribute, it's a processing instruction. And yes, the difference does matter.

This page in the KC explains how XMLNSC deals with processing instructions: https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/ac67196_.html

You will notice that, by default, XMLNSC discards them when parsing. But you can still put them into the message tree using ESQL. And you can also politely ask XMLNSC not to discard them when parsing. So...

1. Create a minimal document containing your processing instruction
2. Create a tiny message flow that parses that document. Make sure that you have enabled the special setting that preserves processing instructions for XMLNSC!
3. Add a Trace node after the input node and set the pattern to ${Root}
4. Examine the output of the Trace node. It will tell you exactly what the message tree needs to look like if you want to generate that document.
5. In your real message flow, add a single line of ESQL to create your processing instruction.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Create Atribute after Prolog
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.