From: Salim Reza Date: 2010-12-16T20:47:36+09:00 Subject: Re: xml parsing in ruby Abinoam Jr. wrote in post #968720: > Salim, Hi Abinoam, I am really grateful to you for your immense help. > Why the second " But there's const StateP (P not PAR). > Wouldn't it be StatePAR ? You are right. It should be "PAR" instead of "P" (that is: StatePAR) in order to maintain the consistency and easiness. I have extended your help_code to messages. However, output result appends all messages to each role, whereas each role(TC and PAR) should have its own messages list. For example: I need: typedef int[0,1] MsgsTC; const MsgsTC PREPARE_TC = 0; bool msgsTc[MsgsTC]; as an out put. But my output shows: typedef int[0,1] MsgsTC; const MsgsTC PREPARE_TC = 0; const MsgsTC COMPLETE_PAR = 1; that means it also appends message from the PAR role which should not happen. I do not understand how do decrease ranges. Though I have tried. I attach again revised xmlfile.xml and rubyfile.rb. Please help. > What language is this? This is C/C++ based language used by Uppaal tool. Thanks once again for help. Attachments: http://www.ruby-forum.com/attachment/5564/xmlfile.xml http://www.ruby-forum.com/attachment/5565/rubyfile.rb -- Posted via http://www.ruby-forum.com/.