|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Copying a XMLNSC tree to a SHARED ROW variable |
« View previous topic :: View next topic » |
Author |
Message
|
ccrandall |
Posted: Tue Oct 05, 2010 10:28 am Post subject: Copying a XMLNSC tree to a SHARED ROW variable |
|
|
Acolyte
Joined: 23 Oct 2008 Posts: 52
|
I have a JCN that reads in a XML configuration file and writes it to LocalEnvironment.Variables. Later, the XML tree is written to a SHARED ROW variable:
DECLARE ServiceCatTable SHARED ROW;
SET ServiceCatTable = LocalEnvironment.Variables.XML;
In this XML file, some of the nodes are empty. So, I would expect them to be represented by ''. Under the XML domain, this all worked fine. However, when I switched to XMLNSC, those '' turned into NULL.
I determined the issue was during the assignment to ServiceCatTable. I took LocalEnvironment.Variables.XMLNSC and iterated through it and saw that the nodes that were empty had values of ''. After assigning to ServiceCatTable, those values were now NULL.
I figured this would happen. In other areas of my code where I copied a XMLNSC tree, I had to set the domain. However, here I'm running into a problem. I'm not sure how I can create ServiceCatTable so it's under the XMLNSC domain??
If I made a node under ServiceCatTable, called Variables, I could do this:
CREATE LASTCHILD OF ServiceCatTable DOMAIN('XMLNSC') Name 'Variables';
This works in so far as my '' values stay ''. The problem here is that there's a lot of code that would need to be changed to accommodate this and I can't see why I'd need a node under the root in order to set the parser domain.
The workaround I'm using now is when we try to match on one of the fields that is empty, I use COALESCE to change the NULL to ''. That works, but I'd really like to know how to set this domain properly in the first place.
Thanks!
Curt |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|