July 2007


Advertisements

The Top 25 companies based on the annual ranking by America’s popular Fortune Magazine:

  1. Wal-Mart Stores
  2. Exxon Mobil
  3. General Motors
  4. Chevron
  5. ConocoPhillips
  6. General Electric
  7. Ford Motor
  8. Citigroup
  9. Bank of America Corp.
  10. American Intl. Group (more…)

Comparison of DOM and SAX

DOM SAX
Tree approach is useful for small documents in which the program needs to process a large portion of the document. Event driven approach is useful for large documents in which the program only needs to process a small portion of the document.
SAX parsers generally require you to write a bit more code than the DOM interface. If you use DOM to construct the tree, extract the data and throw away the tree, then SAX might have been more efficient.
Unless you build a DOM style tree from your application’s internal representation for the data, you can’t as easily write the XML file back to disk. The DOM tree is not constructed, so there are potentially less memory allocation.
  If you convert the data in the DOM tree to another format, the SAX API may help remove the intermediate step.
  If you do not need all the XML data in memory, the SAX API allows you to process the data as it is parsed.

(more…)

Characteristics of XML

  • Based on SGML, as is HTML
  • Can create your own elements (tags) and attributes
  • Specification is strict, so that machines can efficiently read and interpret XML

Related Specifications

  • Document Type Definition (DTD): specifying structure of XML documents
  • XML Schema: specifying structure of XML documents
  • Extensible Stylesheet Language – Transformation (XSLT): specifying the display of an XML document
  • XML Query: extracting and combining XML document components

Uses for XML

  • For displaying documents in multiple formats
  • For exchanging information between computers

Uses of XML Programming

  • Transforming XML documents on the server before delivering them to browsers.
  • Combining XML documents from various servers before delivering combined results to browsers.
  • Creating your own XML authoring and editing tools, for example, allowing authors to enter content using HTML forms.
  • Validating XML documents when document authors publish them to the server.
  • Using XML as a tool to assist in other programming tasks.

Using XSLT Instead of Programming

  • Supports selection and re-ordering of elements, counters, conditional statements, inserting additional content.

Tree-Traversal and Event-Driven Models

  • Tree traversal approaches reads entire document into a tree data structure and provides mechanisms for navigating through the tree an altering the tree.
    Standard: Document Object Model (DOM)
  • Event driven approaches scan the document, triggering events specified by the programmer.
    Standard: Simple API for XML (SAX)

Source: http://www.sdc.iup.edu/outreach/fall2000/xml2/

A protocol is about a standard method used at each end of a communication channel, in order to properly transmit information. We use a mail client to access a mail server. The mail client and mail server can exchange information with each other using a variety of protocols.

IMAP (Internet Message Access Protocol) – Is a standard protocol for accessing e-mail from your local server. IMAP is a client/server protocol in which e-mail is received and held for you by your Internet server. As this requires only a small data transfer this works well even over a slow connection such as a modem. Only if you request to read a specific email message will it be downloaded from the server. You can also create and manipulate folders or mailboxes on the server, delete messages etc.

The POP (Post Office Protocol 3) protocol provides a simple, standardized way for users to access mailboxes and download messages to their computers.When using the POP protocol all your eMail messages will be downloaded from the mail server to your local computer. You can choose to leave copies of your eMails on the server as well. The advantage is that once your messages are downloaded you can cut the internet connection and read your eMail at your leisure without incuring further communication costs. On the other hand you might have transferred a lot of message (including spam or viruses) in which you are not at all interested at this point.

The SMTP (Simple Mail Transfer Protocol) protocol is used by the Mail Transfer Agent (MTA) to deliver your eMail to the recipient’s mail server. The SMTP protocol can only be used to send emails, not to receive them. Depending on your network / ISP settings, you may only be able to use the SMTP protocol under certain conditions.

The HTTP protocol is not a protocol dedicated for email communications, but it can be used for accessing your mailbox. Also called web based email, this protocol can be used to compose or retrieve emails from an your account. Hotmail is a good example of using HTTP as an email protocol.