Skip to main content

Posts

Showing posts from October, 2011

TCP/IP Email

Email is one of the most important uses of TCP/IP. You Don't When you write an email, you don't use TCP/IP. When you write an email, you use an email program like Lotus Notes, Microsoft Outlook or Netscape Communicator. Your Email Program Does

TCP/IP Protocols

A Family of Protocols TCP/IP is a large collection of different communication protocols based upon the two original protocols TCP and IP. TCP - Transmission Control Protocol TCP is used for transmission of data from an application to the network. TCP is responsible for breaking data down into IP packets before they are sent, and for assembling the packets when they arrive.

TCP/IP Addressing

IP Addresses Each computer must have an IP address before it can connect to the Internet. Each IP packet must have an address before it can be sent to another computer. This is an IP address: 192.68.20.50 This might be the same IP address:  www.w3schools.com An IP Address Contains 4 Numbers. Each computer must have a unique IP address. This is your IP address: 182.183.177.251

TCP/IP Introduction

Computer Communication Protocol A computer communication protocol is a description of the rules computers must follow to communicate with each other. What is TCP/IP? TCP/IP is the communication protocol for communication between computers on the Internet. TCP/IP stands for T ransmission C ontrol P rotocol / I nternet P rotocol. TCP/IP defines how electronic devices (like computers) should be connected to the Internet, and how data should be transmitted between them.

TCP/IP Tutorial

Your Browser and Server use TCP/IP Browsers and servers use TCP/IP to connect to the Internet. A browser uses TCP/IP to access a server. A server uses TCP/IP to send HTML back to a browser. Your E-Mail uses TCP/IP Your e-mail program uses TCP/IP to connect to the Internet for sending and receiving e-mails. Your Internet Address is TCP/IP Your Internet address "182.183.177.251" is a part of the standard TCP/IP protocol (and so is your domain name).

Introduction to XML

XML was designed to transport and store data. HTML was designed to display data. What You Should Already Know Before you continue you should have a basic understanding of the following: HTML JavaScript If you want to study these subjects first, find the tutorials on our Home page .

How Can XML be Used?

XML Separates Data from HTML If you need to display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes. With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for layout and display, and be sure that changes in the underlying data will not require any changes to the HTML. With a few lines of JavaScript code, you can read an external XML file and update the data content of your web page.

XML Tree

An Example XML Document XML documents use a self-describing and simple syntax: <?xml version="1.0" encoding="ISO-8859-1"?> <note>   <to>Tove</to>   <from>Jani</from>   <heading>Reminder</heading>   <body>Don't forget me this weekend!</body> </note> The first line is the XML declaration. It defines the XML version (1.0) and the encoding used (ISO-8859-1 = Latin-1/West European character set).

XML Syntax Rules

All XML Elements Must Have a Closing Tag In HTML, some elements do not have to have a closing tag: <p>This is a paragraph <p>This is another paragraph In XML, it is illegal to omit the closing tag. All elements must have a closing tag: <p>This is a paragraph</p> <p>This is another paragraph</p> Note : You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML document itself, and it has no closing tag.

XML Elements

What is an XML Element? An XML element is everything from (including) the element's start tag to (including) the element's end tag. An element can contain: other elements text attributes or a mix of all of the above... <bookstore>

XML Attributes

XML elements can have attributes, just like HTML. Attributes provide additional information about an element. XML Attributes In HTML, attributes provide additional information about elements: <img src="computer.gif"> <a href="demo.asp"> Attributes often provide information that is not a part of the data. In the example below, the file type is irrelevant to the data, but can be important to the software that wants to manipulate the element: <file type="gif">computer.gif</file> XML Attributes Must be Quoted Attribute values must always be quoted. Either single or double quotes can be used. For a person's sex, the person element can be written like this: <person sex="female"> or like this: <person sex='female'> If the attribute value itself contains double quotes you can use single quotes, like in this example: <gangster name='George "Shotgun" Ziegler'> or...

XML Validation

Well Formed XML Documents A "Well Formed" XML document has correct XML syntax. The syntax rules were described in the previous chapters: XML documents must have a root element XML elements must have a closing tag XML tags are case sensitive XML elements must be properly nested XML attribute values must be quoted <?xml version="1.0" encoding="ISO-8859-1"?>

XML Validator

<?xml version="1.0" ?> <!DOCTYPE note [   <!ELEMENT note (to,from,heading,body)>   <!ELEMENT to      (#PCDATA)>   <!ELEMENT from    (#PCDATA)>   <!ELEMENT heading (#PCDATA)>   <!ELEMENT body    (#PCDATA)> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading>

Viewing XML Files

Viewing XML Files <?xml version="1.0" encoding="ISO-8859-1"?>  - < note >         < to > Tove </ to >         < from > Jani </ from >         < heading > Reminder </ heading >         < body > Don't forget me this weekend! </ body >     </ note > Look at this XML file: note.xml The XML document will be displayed with color-coded root and child elements. A plus (+) or minus sign (-) to the left of the elements can be clicked to expand or collapse the element structure. To view the raw XML source (without the + and - signs), select "View Page Source" or "View Source" from the browser menu. Note: In Safari, only the element text will be displayed. To view the raw XML, you must right click the page and select "View Source"

Displaying XML with CSS

Displaying your XML Files with CSS? It is possible to use CSS to format an XML document. Below is an example of how to use a CSS style sheet to format an XML document: Take a look at this XML file: The CD catalog Then look at this style sheet: The CSS file Finally, view: The CD catalog formatted with the CSS file Below is a fraction of the XML file. The second line links the XML file to the CSS file: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/css" href="cd_catalog.css"?> <CATALOG>   <CD>

Displaying XML with XSLT

Displaying XML with XSLT XSLT is the recommended style sheet language of XML. XSLT (eXtensible Stylesheet Language Transformations) is far more sophisticated than CSS. XSLT can be used to transform XML into HTML, before it is displayed by a browser: Display XML with XSLT If you want to learn more about XSLT, find our XSLT tutorial on our homepage .