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 » Add attributes to an xml tag?

Post new topic  Reply to topic
 Add attributes to an xml tag? « View previous topic :: View next topic » 
Author Message
klabran
PostPosted: Wed Mar 03, 2004 12:45 pm    Post subject: Add attributes to an xml tag? Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

I have an output xml tag of:

<PersonHeight feet="5" inches="60"/>

My input message has two tags for this (height and inches).

I know how to get the values from the input tags but how do I put in the feet and inches attributes for the output tag?

Thanks,

Kevin
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Wed Mar 03, 2004 12:51 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Search for 'Attribute' either on this site, or in the ESQL manual.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
klabran
PostPosted: Wed Mar 03, 2004 1:20 pm    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Thanks for the hint Eddie.

I seem to be missing something though...

SET OutputRoot.XML.Person.PersonWeightMeasure.(XML.Attribute)feet = InputBody.Citations.Citation[I].Person.Person_ROW.HeightFeet;
SET OutputRoot.XML.Person.PersonWeightMeasure.(XML.Attribute)inches =InputBody.Citations.Citation[I].Person.Person_ROW.HeightInches;

This creates an error at runtime. Error message is not helpful from what I can see other than 'no valid body of the document could be found.'

I even took out the InputBody code and hard coded some values but I still received the same error.

?

Kevin
Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Wed Mar 03, 2004 1:56 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

"No valid body" implies that the OutputRoot.XML wasn't built, or was built with more than one top level tag.

I would suggest (debug) tracing the node that builds the output tree and make sure that (a) your SETs actually do set some data so that you really have an outout tree and (b) that everything that you do build starts with EXACTLY the same top level tag.

Also, feet and inches seem a strange way of describing weight.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
klabran
PostPosted: Wed Mar 03, 2004 2:05 pm    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

We like to do things in Arizona a little different.

HeHe!

Well, I can't see the output in debug mode????

All I have is the input data....

I put a break on the failure for the compute node???
Back to top
View user's profile Send private message Visit poster's website
klabran
PostPosted: Wed Mar 03, 2004 4:42 pm    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 259
Location: Flagstaff AZ

Figured it Out.... Had to cast the inputbody values to strings...

SET OutputRoot.XML.CitationEvent.Citation.Person.PersonHeightMeasure.(XML.Attribute)feet = CAST(InputBody.Citations.Citation[I].Person.Person_ROW.HeightFeet AS CHAR);
SET OutputRoot.XML.CitationEvent.Citation.Person.PersonHeightMeasure.(XML.Attribute)inches = CAST(InputBody.Citations.Citation[I].Person.Person_ROW.HeightInches AS CHAR);




It's a real trial by fire for me on eSQL.

Thanks for all the help.

Kevin
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Add attributes to an xml tag?
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.