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 » Second Header of an xml

Post new topic  Reply to topic
 Second Header of an xml « View previous topic :: View next topic » 
Author Message
RocknRambo
PostPosted: Mon Mar 13, 2006 5:06 pm    Post subject: Second Header of an xml Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

can anyone guide me how do I acces second header of an xml..


Quote:
<?xml version="1.0" encoding="UTF-8"?>
<?CWRSD status="-1" description=" Msg. Set Number: 15 Msg. Number: 11, Msg. Type 1, Message: Invalid value -- press the prompt button or hyperlink for a list of valid values (15,11) Msg. Set Number: 91 Msg. Number: 34, Msg. Type 1, Message: Error changing value. {RF_SERVICE_ORDER.SITE_ID} (91,34) Msg. Set Number: 0 Msg. Number: 0, Msg. Type 1, Message: Failed to execute PSBusComp request "?>


was trying to use
Code:
FIELDNAME(InputRoot.XML.*[2]);


coming as blank

Thanks
-RR
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 13, 2006 5:24 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

An XML is not like an MRM.

It has to be well formed:

InputRoot.XML.<xmlroot>

There can only be one element under InputRoot.XML and this is your root xmltag. Let's look at a book:

InputRoot.XML.mybook.[] here [] would represent the collection of chapters.

You cannot have 2 books in this example. If you want 2 books you need a parent tag to "carry them in" that will be your xml root tag.

Enjoy

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Mon Mar 13, 2006 5:45 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

FJ -
He's actually asking about how to access the second XML Processing Instruction in his document, I think.

At least, I think that's a processing instruction...

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/topic/com.ibm.etools.mft.doc/ac17280_.htm
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Mon Mar 13, 2006 5:46 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

Correct, There shud be one & only one Root Tag.. but the same there could be multiple headers..

for Ex: in the given snippet

Quote:
<?xml version="1.0" encoding="UTF-8"?> xml Header
<?CWRSD status="-1" description=" Msg. custom Header


I think is a valid one


-RR
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 13, 2006 5:52 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

RocknRambo -

"Header" is the wrong word.

XML is very specific about what things are called, and I believe the one you're using is a generic processing instruction and not something else.

Try and see what
Code:
InputRoot.XML.(XML.ProcessingInstruction)CWRSD.(XML.Attribute)status
returns.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Mon Mar 13, 2006 5:53 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

Jeff,

the link specifies accessing XmlDecl <?xml version="1.0">.. but didnt find custom header (second header)..

I might be missing something.. am I ?

thanks
-RR
Back to top
View user's profile Send private message
JT
PostPosted: Mon Mar 13, 2006 5:56 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

ProcessingInstruction
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Mon Mar 13, 2006 6:19 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

Thank you for the terminology,

Code:
InputRoot.XML.(XML.ProcessingInstruction)CWRSD.(XML.Attribute)status


is NOT return the Status in tht...

but
Code:
InputRoot.XML.(XML.ProcessingInstruction)CWRSD
does return the whole,

I'm looking for the attribute "Message:", which contains the error.. but else too. can Live

Thanks

-RR
Back to top
View user's profile Send private message
SixBlade
PostPosted: Tue Mar 14, 2006 2:41 am    Post subject: Reply with quote

Apprentice

Joined: 03 Dec 2003
Posts: 26
Location: UK

Hi,

as far as I understand, the parser won't treat the value after <?CWRSD as xml attributes, it's just a value:

From http://aspalliance.com/515#Page2

"Firstly, what is an XML processing instruction? A processing instruction (PI) is a tag that encodes specific application information which begins with <? and ends with ?>. An XML document can contain multiple processing instructions for different applications. There are two parts to a processing instruction, a target and a value. The target acts like a name and the value is the string after the target. The value can consist of multiple tokens.

<?target value?>"
Back to top
View user's profile Send private message
RocknRambo
PostPosted: Tue Mar 14, 2006 6:33 am    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

Thanks Much!.. very Educative.

-RR
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 » Second Header of an xml
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.