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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is meant by

Status
Not open for further replies.

zhshqzyc

Programmer
Jan 21, 2006
13
US
Code:
<REASON_CODES>
  <REASON ID="555" Description="Test" /> 
 </REASON_CODES>
Does it be equally as
Code:
<REASON_CODES REASON ID="555" Description="Test">
 </REASON_CODES>
Thanks
 
>Ignore it.

Easy for you to say now. :)

And to answer your question for the benefit of others: No. Your second block of code is malformed because of the space in the first attribute name.
 
Code:
<REASON_CODES>
  <REASON ID="555" Description="Test" />
</REASON_CODES>
...is equivalent to...
Code:
<REASON_CODES>
  <REASON ID="555" Description="Test"></REASON>
</REASON_CODES>
The REASON tag in Example1 is an empty self-closing tag i.e. there is no content between opening and closing REASON tags, it only has attribute data.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top