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 parsing question

Post new topic  Reply to topic
 XMLNSC parsing question « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Fri Jul 13, 2007 6:19 am    Post subject: XMLNSC parsing question Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

I'm unable to get the two lines of code to bring back the version and encoding when using a XMLNSC parser, only will work with the XML parser.

This is code I have used every where for years, when I try to use XMLNSC now, no matter how I code this I can not get these values back.

Any ideas on what the syntax would be running under XMLNSC?

InputRoot.XMLNSC.(XMLNSC.XmlDecl) does not exist for example.
Thanks.

set Environment.CharacterSet.Version =
InputRoot.XML.(XML.XmlDecl).XML.Version);
set Environment.CharacterSet.Encoding =
InputRoot.XML.(XML.XmlDecl).(XML."Encoding");
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 13, 2007 6:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Have you tried searching/reading the docs? This is explained quite clearly in the topic 'Manipulating messages using the XMLNSC parser'.
Back to top
View user's profile Send private message
schroederms
PostPosted: Fri Jul 13, 2007 7:03 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Yes, that is why I tried to parse using the XMLNSC parser and the attribute names I need to reference, however the complier failes with a not valid name. It is either XMLNSC or XML, you can not mix the instructions, so to get this flow to work I need to resort back to using the XML parser on the input node DOMAIN unless someone can show me on these two lines of code what is wrong.
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Fri Jul 13, 2007 7:12 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

Here you go....It's from the infocenter

To migrate to XMLNS, change the root:
SET OutputRoot.XMLNS.(XML.XmlDecl)*.(XML.Version)* = '1.0';
Although the XMLNS parser is used, the element type constants are those that belong to the XML parser. This code works because the type values that are used by the XML and XMLNS parsers are the same. For the XMLNSC parser, however, the type values are different and, therefore, you must always use its own type constants.

In the XMLNSC domain no special type exists for the XML version; it is treated as an attribute of the XML declaration. The equivalent syntax for the above example is:
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Version = '1.0';
In a similar way, in the XMLNSC domain, the XML encoding type and XML standalone mode are also processed as attributes of the XML declaration and can be set using the following ESQL:
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)Encoding = 'UTF-8';
SET OutputRoot.XMLNSC.(XMLNSC.XmlDeclaration)*.(XMLNSC.Attribute)StandAlone = 'Yes';


Cheers,
Back to top
View user's profile Send private message
schroederms
PostPosted: Fri Jul 13, 2007 7:28 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks, I was on that page but must have fallen a sleep before I got down that far. Usually when I search on XMLNSC I would not expect a novel returned. thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jul 13, 2007 7:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
must have fallen a sleep before I got down that far.
That's why your browser has a 'Find' button, and why the docs have a Search button.
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 parsing question
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.