my dog learned polymorphism*
The moose likes Product and Other Certifications and the fly likes XML Certification Notes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "XML Certification Notes" Watch "XML Certification Notes" New topic
Author

XML Certification Notes

Johnson Jose
Greenhorn

Joined: May 19, 2004
Posts: 19
Hi Friends,

I would like to share some of my certification notes with all of you.
This I have collected from various books and site.
Please correct / add to this note, so this will be helpful to those who prepare for the certification.

Thanks in advance

Regards
Johnson
=====================
Topic -1 : XML Basics
=====================
1. What is XML?
XML stands for EXtensible Markup Language.

XML is a markup language much like HTML.

XML is basically a textural data �marked up� with self-defining tags that follows a well-defined set of rules.

The XML document consists of tags and text. The tags normally contain �key/value� pairs.

XML was designed to describe the data. That is to structure, store and to send information.

In XML tags are not predefined. You must define your own tags.

The primary strength of XML is its simplicity.

XML uses a DTD or an Schema to describe the data.

XML is a W3C Recommendation.
----------------------------------- End ------------------------------
2. What is the difference between XML and HTML?
XML is not a replacement for HTML. XML and HTML were designed with different goals:

XML was designed to �describe and carry the data�. Here the focus is �what data is�.

HTML was designed to �display data� and to focus on �how data looks�.

---------------------------------- End ---------------------------------
3. What are the basic building blocks of XML?
The basic building blocks of XML files are elements and attributes.

---------------------------------- End ---------------------------------
Johnson Jose
Greenhorn

Joined: May 19, 2004
Posts: 19
4. What is an xml Element?
Elements are the main component of an XML document.

An element is represented by using a start tag (<> and an end tag (</> .

For example: Book element can be represented as <Book></Book>

Everything between the start and end tags of an element is considered to be the content of the element.

The content of an element can be
character data - CDATA(text),
no content (empty element), or
other elements (known as child elements).

Elements can also contain comments, processing instructions, or entity references.

We can represent empty elements with a single special tag
Example : <Book/>
This is equivalent to: <Book></Book>

--------------------------------- End ---------------------------------
5. What is an Attribute?
Attributes give you more information about the data an element represents.

An element can contain any number of attributes.

Attributes are specified as name-value pairs and they appear within the start tag of the element.

Attribute values are enclosed within quotes.

An attribute value may contain text characters, entity references, or character references.

Attribute names are unique within the same element. That is in a single element, no two attributes can have the same name.

For example:
<Book isbn="s325-034-778"></Book>
is valid,
but
<Book isbn="s325-034-778" isbn="s353-412-341"></Book>
is not valid.

--------------------------------- End ---------------------------------
6. Well-formed XML Document?
XML code that follows certain rules defined in the W3C XML specifications is called well-formed XML.

An XML document is said to be well formed if:

For each element defined in the XML document, every start tag has a corresponding end tag.

All the XML elements must nest properly within each other.
For example,
<book><name></book></name>
is not allowed, but
<book><name></name></book>
is allowed.

In each element, no two attributes have the same name.

Markup characters are properly specified.

The document contains only one root element.
That is an element that is present only once in the document and does not appear as a child of any other element.

The first element must contain the special tag that identifies the file as an XML document.

Attributes (extra information that can be provided for an elements) must be properly quoted.

Both the elements and attributes must follow the proper naming conventions.

--------------------------------- End ---------------------------------
Gagan Indus
Ranch Hand

Joined: Feb 28, 2001
Posts: 346
Thanks Johnson!


Gagan (/^_^\) SCJP2 SCWCD IBM486 <br />Die-hard JavaMonk -- little Java a day, keeps you going.<br /><a href="http://www.objectfirst.com/blog" target="_blank" rel="nofollow">My Blog</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Certification Notes
 
Similar Threads
HTML & XML
XML with DCOM and Ajax by Sas
XML, HTML, what's the difference?
convert html to xml
"XML IN A NUTSHELL Second Edition" - release announcement - O'Reilly