Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transmitting data with XML

Status
Not open for further replies.

therealmikenelson

IS-IT--Management
May 15, 2002
2
US
We are passing XML to another system. A large dispute has arisen concerning how XML tags that contain no data must be passed. Our problem is our BizTalk application handles a tag with no data with a single element closed at the end ex. <gateway_id /> as opposed to <gateway_id></gateway_id> or not sending it at all. Is sending a single element to indicate no data <gateway_id /> proper according to the XML standard?

Is this well-formed XML according to the standard to send to another computer that is expected to comply with the XML standard?
Example below:
<s2>
<s2form>
<MerchantInfo>
<MerchantRecord>
<stat_ind>1</stat_ind>
<gateway_id />
<phone>770-555-5555</phone>
</MerchantRecord>
</MerchantInfo>
</s2form>
</s2>
 
w3c recommendation said:
Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword EMPTY. For interoperability, the empty-element tag SHOULD be used, and SHOULD only be used, for elements which are declared EMPTY.

The keywords, apparently, are declared (e.g., in a DTD) and interoperability.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top