Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

REST Services XML Nodes naming conventions

Hi!

Is there some naming convention for the nodes in XML that I get from RQM w.r.t any resource??

I have a doubt because our team has recently changed the application to point to a new RQM Server of same version as earlier.
The issue we faced was that name of the nodes in XML we get, got changed and preceded by some prefix like "ns1:" etc.
For eg. earlier say the node was <state>, now it got changed to <ns2>.

This is causing a problem as we may have to change the code everytime we change the RQM Server.

Is anyone having any pointers on this???

Please reply.

0 votes



3 answers

Permanent link
The prefix (e.g. ns2) is a shortened namespace prefix notation. The namespaces are declared at the top of the XML resource/feed (see https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_Schema). The overall structure of the resource will not change between servers instances when using the same URLs. That said, the resource properties may change between servers instances when using the same URLs depending if resources have different resource property values.

I believe your example in your post was truncated. Can you provide another example without the markup characters?

0 votes


Permanent link
Hi Paules...
For instance, earlier I was getting the XML of say TestSuite, the state node was with the tag name "state". But, in the new server it got changed to "ns2:state".
How do I tackle such situations?? I am completely clueless.
This can pose a great setback to us in case of change in the servers.

0 votes


Permanent link
The addition of a namespace prefix should not impact your code if you are a namespace-aware XML parser, since the namespaces are defined in the XML element. If you have custom code that is parsing the XML, you will have to refactor the code to handle namespaces, according to the RQM XML schema (see https://jazz.net/wiki/bin/view/Main/RqmApi#RQM_Schema).

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 19 '11, 6:48 a.m.

Question was seen: 5,634 times

Last updated: Sep 19 '11, 6:48 a.m.

Confirmation Cancel Confirm