• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

well formed ?

 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<ItemsList><Items name=">kk"><SuppName>raj3</SuppName></Items></ItemsList>
while reviewing for the exam the above example is suppose to be well formed,
but to me it doesn't appear that way - the below part looks wrong to me
<Items name=">kk"> the > before the kk
why is this
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks wrong to me as well. I think the correct way is:
name=&_quot;&_gt;kk&_quot;
Note: no underscore here!
[ January 06, 2003: Message edited by: Don Liu ]
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is well formed – only the characters < and & are not allowed in the attribute content. & is always interpreted as the beginning of an entity or character reference.
Cheers,
Dan
 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Dan and Don, so it is well formed, but not valid?
 
See El
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mary morris:
Thanks for your reply Dan and Don, so it is well formed, but not valid?

To decide whether XML document is valid or not you must provide a DTD or Schema against which it will be validated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic