Presentation is loading. Please wait.

Presentation is loading. Please wait.

Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display.

Similar presentations


Presentation on theme: "Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display."— Presentation transcript:

1 Softsmith Infotech XML

2 Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display data XML tags are not predefined. You must define your own tags Self-descriptive W3C Recommendation

3 Softsmith Infotech Overview Comparing HTML and XML XML DTD XSD XSL Tags Naming convention Usage Parsing

4 Softsmith Infotech HTML and XML HTML –Display data –How data looks? XML –Store and Retrieve data –What data is?

5 Softsmith Infotech XML Usage To display html contents, dynamically Helps to store data that has no compatibility issues Simplifies data transfer Platform independent

6 Softsmith Infotech XML Format Similar to HTML Has start tags and end tags Strict nesting (every start tag should have an end tag).....

7 Softsmith Infotech XML Tags Every start tag should have an end tag Tag names are case sensitive Attribute values should be enclosed in quotes XML documents should have a root element XML tags should be properly nested

8 Softsmith Infotech XML Special characters &lt &gt &amp &apos &quot XML – Whitespace is preserved

9 Softsmith Infotech Comments in XML <!-- - Start - -> End Similar to HTML

10 Softsmith Infotech XML Naming Rules Names can contain letters, numbers, and other characters Names must not start with a number or punctuation character Names must not start with the letters xml (or XML, or Xml, etc) Names cannot contain spaces

11 Softsmith Infotech Best Naming Practices Make names descriptive. Names with an underscore separator are nice:,. Names should be short and simple, like this: not like this:. Avoid "-" characters. If you name something "first-name," some software may think you want to subtract name from first. Avoid "." characters. If you name something "first.name," some software may think that "name" is a property of the object "first." Avoid ":" characters. Colons are reserved to be used for something called namespaces (more later). XML documents often have a corresponding database. A good practice is to use the naming rules of your database for the elements in the XML documents. Non-English letters like éòá are perfectly legal in XML, but watch out for problems if your software vendor doesn't support them.

12 Softsmith Infotech XML Attributes limitation Attributes cannot contain multiple values Attributes cannot contain tree structures Attributes are not easily expandable

13 Softsmith Infotech XML types Well formed XML - XML written with correct syntax Valid XML – A well formed XML which also conforms to the rules of DTD (Document type definition) or an XSD (XML Schema definition)

14 Softsmith Infotech DTD Document Type Definition Tells how an XML document is to be structured Used by XML Parser to check for the validity of XML document

15 Softsmith Infotech XSD XML Schema Definition Similar to DTD, but more powerful than it Tells the parser, what are the elements that an xml document will contain and what data type do each element belongs to

16 Softsmith Infotech XSL Extensible Style sheet Language Similar to CSS for HTML Defines styles for an xml document Controls the format of XML tag XML document will be displayed in a raw way in the browser. That is with – and + symbols XSL makes XML document more appealing

17 Softsmith Infotech XML Parsers Two parsers available for XML –SAX Simple API for XML Reads XML document serially –DOM Document Object Model Treats every XML tag as an element or object with in a document Can access each tag as Document.Node or Document.ParentElement Available in.Net framework


Download ppt "Softsmith Infotech XML. Softsmith Infotech XML EXtensible Markup Language XML is a markup language much like HTML Designed to carry data, not to display."

Similar presentations


Ads by Google