Tuesday, November 23, 2010

SOAP

Simple Object Access Protocol (SOAP) uses XML to define the protocol fro the exchange of information in distributed computing.
SOAP consists of three components:
  1. Envelpe
  2. A set of encoding rules
  3. A convention for reresenting remote procedure calls

Tuesday, November 16, 2010

Open an XML File using Internet Explorer

  • Open the Notepad and type in the following
<name>
<first>John</first>
<last>smith</last>
</name>
  • Save the document to your hard drive as name.xml. If you are using Windows XP, be sure to save as Type drop-down to All Files.
  • You can open the file in Internet Explorer.

Thursday, November 4, 2010

SGML

SGML is Standard Generalised Markup Language. It is the international standard for defining descriptions of the structure of different types of electronic document.

XML is a lightweight cut-down version of SGML which keeps enough of its functionality to make it useful but removes all the operational features which made SGML too complex to program for in a Web environment.

XML is an abbreviated version of SGML, to make it easier to use over the Web, easier for you to define your own document types, and easier for programmers to write programs to handle them.

Wednesday, November 3, 2010

XML Tags

The information in XML document is contained within various tags that constitute the markup of the document.

XML Tags begin with <> sign, that is not inside a comment or a CDATA session.

The tags are paired, so that any opening tag must have a closing tag. The end-tags are same as start-tags except that they have a / right after the opening < character.

All of the information from the beginning of the start-tag to the end-tag, and including every thing in between is called an element.

The text between start-tag and end-tag is called the element content.

XML Tag Rules

  • All well-formed XML document must have at least one element.
  • Maintain case within a tag set.
  • XML elements may contain other elements but the nesting of elements must be correct.
  • Tags Naming
  1. Tags should begin with either a letter, an underscore(_) or a colon (:) followed by some combination of letters, numbers, periods (.), colons, underscores, or hyphens (-) but no white space. It is also a good idea to not use colons as the first character in a tag name even if it is legal.
  2. Names cannot contain spaces.
  3. Names can't start with the letters xml, in uppercase, lowercase, or mixed. you can't start a name with xml, XML, XmL or any other combination.
  • Define Valid Attributes
Tags may specify any number of supporting attributes. Attributes, must not duplicate in any one tag, specify name/value pair delimited by equal (=) sign in which the value is delimited by quotation marks.

XML Document Structure

XML Documents are composed of set of "entities", that are identified by unique names. All documents begin with a "root" or document entity. All other entities are optional.

XML Documents have a logical structure. Logically, documents are composed of declarations, elements, comments, character references, and processing instructions, all of which are indicated in the document by explicit markup.

XML Declaration is included as the first line in the document. It defines the XML Version of the document. In this case the document is of 1.0 version.

XML groups information in hierarchies. The items in the document relate to each other in parent/child and sibling/ sibling relationship.

Root element: First element of the document is called Root element. This element is the "the parent" of all other elements.

XML Tree starts at the root and branches to the lowest level of the test.

<root>
<child>
<subchild>...</subchild>
</child>
</root>

The terms parent, child and sibling are used to describe the relationship between elements. Parent elements have children. Children on the same level are called siblings (brothers or sisters).


All XML documents must have a root tag.

XML structure is called tree, and any parts of the tree that contain children are called branches, while parts that have no children are called leaves.

XML Element

Elements are the basic unit of XML content. Syntactically, an element consists of a start tag, and an end tag, and every thing in between.

The start tag consists of a name surrounded by angle brackets. The end tag consissts of the same name surrounded by angle brackets, but with a slash preceding the name.

XML defines the text between the start and end tag to be "character data"

Tuesday, November 2, 2010

XML Attributes

XML Attributes

XML attributes provide additional information about elements. Attributes are always contained within the start tag of an element.

Atttributes are name-value pairs that are separated by an equals sign(=). They may occur inside start-tags or empty tags, but never inside end-tags.

Attributes must have vales - even if that value is just an empty string (such as "") - and those values must be in quotes.

Either single quotes or double quotes are fine, but they have to match.
Example:
<input checked='true'>
or
<input checked="true">
but you can't use
<input checked="true'>