Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] need clarification on xml nmwg

Subject: perfsonar development work

List archive

Re: [pS-dev] need clarification on xml nmwg


Chronological Thread 
  • From: "Jeff W. Boote" <>
  • To: ulisses <>
  • Cc:
  • Subject: Re: [pS-dev] need clarification on xml nmwg
  • Date: Thu, 24 Aug 2006 09:50:58 -0600

These are development related questions - so I'm only responding on that list.

ulisses wrote:
Hi all

Because of my problems in XML conversions and some comments, I'm not sure If I'm doing right when returning the xml. I understood that any XML document syntactically correct should be ok.

am I right? in this case I don't understand why I have xml to dom failures.

Of course, a well organized xml document is preferable. Currently, in the xml output I have to send as response, I have to return a list of links, a list of n
odes [*] and the return code.

Which should be the way do structure the document? are there guidelines?

Maybe the way to do it should be:

This is much closer to correct. As others have already pointed out - you had a very strange looking structure (nested data elements - metadata information in data elements...)

<nmwg:message>
<nmwg:metadata id="TOPSDownloadDBResponseMetadata"/>
<nmwg:data metadataIdRef="TOPSDownloadDBResponseMetadata">

// list of link elements

</nmwg:data>

<nmwg:data metadataIdRef="TOPSDownloadDBResponseMetadata">

// list of node elements

</nmwg:data>

// result code metadata and data

<nmwg:metadata id="result code">
<nmwg:eventType>success.ls.remove</nmwg:eventType>
</nmwg:metadata>

<nmwg:data id="result code description" metadataIdRef="result
code">
<nmwg:datum>Text explaining the error message</nmwg:datum>
</nmwg:data>

</nmwg:message>

One thing that is not correct. You are reusing the same id's in metadata and data elements. id's should be unique unless they are referring to the 'same' element.

jeff



Archive powered by MHonArc 2.6.16.

Top of Page