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 » XMLNSC parshing - Empty Elements

Post new topic  Reply to topic
 XMLNSC parshing - Empty Elements « View previous topic :: View next topic » 
Author Message
scravr
PostPosted: Wed Oct 31, 2007 11:59 am    Post subject: XMLNSC parshing - Empty Elements Reply with quote

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
View user's profile Send private message Send e-mail MSN Messenger
jefflowrey
PostPosted: Wed Oct 31, 2007 12:03 pm    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Wed Oct 31, 2007 3:52 pm    Post subject: Reply with quote

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
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 » XMLNSC parshing - Empty Elements
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.