Blog

Learning XML Part II (Nicky Tests Software)

On April 16, 2013, in Syndicated, by Association for Software Testing
0
All XML Elements must have a Closing tag
Unlike in HTML where some elements don’t need one.
This is very important- when I update existing XML documents so that I can send a message to another systemà this is a basic thing I check so that I don’t get annoyed by a stupid error message
Oh, and if you need more incentive. It’s ILLEGAL.
 
XML tags are Case sensitive
Opening and Closing tags must be written with the same case
Otherwise, they are technically different.
 
XML Documents Must have a Root Element
In other words, all of the elements need a mummy. At least one element must be a parent to the others.
For example it should be:
<Book>
<Title>Hunger Games</Title>
</Book>
You can’t put just:
<Title>Hunger Games</Title>
(P.S. The Hunger Games Catching Fire Trailer is out now- trés excited!)
XML Attributes
Attributes provide more information about the element.
These always have to be in either single or double quotes.
Also, they only need to be in the opening tag, you don’t need to repeat the attribute in the closing tag.
Example:
<Recipe cuisine=”Italian”>
<Name> Spaghetti </Name>
</Recipe>
 
(Next week: Excitedly planning for a trip to Oregon)
 

Comments are closed.


Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!