REST Services XML Nodes naming conventions
![](http://jazz.net/_images/myphoto/dc8ece923d2e090ab2fb02b99429cb81.jpg)
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.
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.
3 answers
![](http://jazz.net/_images/myphoto/dc8ece923d2e090ab2fb02b99429cb81.jpg)
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?
I believe your example in your post was truncated. Can you provide another example without the markup characters?
![](http://jazz.net/_images/myphoto/dc8ece923d2e090ab2fb02b99429cb81.jpg)
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.
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.
![](http://jazz.net/_images/myphoto/dc8ece923d2e090ab2fb02b99429cb81.jpg)
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).