|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XMLNSC parshing - Empty Elements |
« View previous topic :: View next topic » |
Author |
Message
|
scravr |
Posted: Wed Oct 31, 2007 11:59 am Post subject: XMLNSC parshing - Empty Elements |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
HI Everyone:
Using XMLNSC, I encountered WBI XSD parsing problems when element is empty, like: <counter/> the parser passed value of previous element.
On both MqInput and Compute nodes: I checked ALL XMLNSC parsher options.
This is a code sample: It takes the values form input XML and assign to DB-fields:
DECLARE NS1 NAMESPACE 'http://www.nyc.ny.gov/enterprise';
DECLARE ED REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument;
DECLARE DH REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentHeader;
DECLARE DBH REFERENCE TO DH.NS1:DocumentBusinessHeader;
DECLARE DB REFERENCE TO InputRoot.XMLNSC.NS1:EnterpriseDatashareDocument.NS1:DocumentBody;
INSERT INTO Database.dbo.ImportXML2 (
timestamp
, DocumentPostDate
, DocumentPostTime
, count
, seqno
, linecount
, batch)
VALUES (
DBH.timestamp
, DBH.DocumentPostDate
, DBH.DocumentPostTime
, DBH.count
, DBH.seqno
, DBH.linecount
, DBH.batch);
This is the XML sample:
<e:EnterpriseDatashareDocument xmlns:e="http://www.nyc.ny.gov/enterprise"><e:DocumentHeader><e:DocumentServiceID>DOITT_311_push_1</e:DocumentServiceID><e:DocumentBusinessHeader><timestamp>2007-10-26 15:14:37</timestamp><DocumentPostDate>2007-10-26</DocumentPostDate><DocumentPostTime>15:14:35</DocumentPostTime><count/> <seqno/><batch/><linecount/><filename/><sendtime/><header/><headerLine/><AGENCYDATA><CSMSSRNUMBER>1-1-113665414</CSMSSRNUMBER> … … ……..
In this case ALL empty elements (starting count) are getting value of 15:14:35 (as for DocumentPostTime).
What do I need to do in order to get SPACES for empty elements?
HELP ! HELP ! HELP !
Thank you,
Moshe |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 31, 2007 12:03 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, you can try using the XMLNS parser, instead of the XMLNS Compact parser.
Or you can try using COALESCE on your INSERT to replace a NULL with a " ". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Oct 31, 2007 3:52 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
This is known defect. You're one of many to report it via this forum.
Get v6 FP5 - it contains the fix. |
|
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
|
|
|
|