XML DTD
XML DTD एक Formal Specification है, जो XML Document के Structure और Legal Element और Attribute को Define करता है। यह XML Document की Integrity को Validate करने के लिए एक Blueprint के रूप में कार्य करता है, यह सुनिश्चित करते हुए कि वे Rule के Predefined Set का पालन करते हैं।
Example:
इस Example में, DTD एक Bookstore XML Document Structure को Define करता है। यह Specify करता है, कि एक Bookstore में एक या अधिक Book होनी चाहिए| और प्रत्येक Book का एक Titile, एक Author और एक Price होनी चाहिए। #PCDATA Parse किए गए Character Data को Indicate करता है, जो Specific Element के भीतर Text Content की Permission देता है।
Advantages of XML DTD
- Simplicity: DTD Simple और समझने में आसान हैं, जो उन्हें Low Complex Document Structure के लिए Suitable बनाता है।
- Compatibility: विभिन्न XML Application के साथ Compatibility सुनिश्चित करते हुए DTD को व्यापक रूप से बनाया गया है।
XML Schema
XML Schema, जिसे XSD (XML Schema Definition) के रूप में भी जाना जाता है, DTD का एक XML-Based Alternative है। यह XML Document Structure को Describe करने के लिए अधिक Pwerful और Flexible Way Provide करता है। XML Schema XML में ही लिखी जाती है, जो इसे DTD की तुलना में अधिक Expressive और Extensible बनाती है।
Example:
इस Example में, हम एक Complex Type के साथ एक Bookstore Element को Define करते हैं| यह Define करते हुए कि इसमें Book Element का एक Order Included है। प्रत्येक Book Element में Specific Data Type के साथ Title, Author और Price Element का एक Order होता है।
Introduction of RSS FEED
RSS (Really Simple Syndication) एक Web Feed Format है, जो User को Standardized Way से Online Content के Update को Access करने की Permission देता है। इसका use Blog, News Website और अन्य Online Publication की Subscription लेने के लिए व्यापक रूप से किया जाता है।
RSS Basic
RSS Feeds, XML-Based File हैं| जिनमें किसी Website पर Latest Update या Entries के बारे में Information होती है। उनमें आमतौर पर Title, Summaries और Full Content के Link Included होते हैं। RSS Users को किसी Website की Subscription लेने और New Content Publish होने पर Information Receive करने की Permission देता है।
Creation of RSS Feed
RSS Feeds बनाने के लिए RSS Specification के अनुसार XML Data की Structring करने की आवश्यकता है।
Example:
इस Example में, <channel> Element में Feed के बारे में Metadata Include है, और प्रत्येक <item> एक Individual Update या Entry को Represent करता है।
Implementation of RSS Feed in Web Page
RSS Feed को एक Web Page में Integrate करने के लिए, XML Data Receive और Parse करने के लिए JavaScript और AJAX का use कर सकते हैं।
Example:
इस Example में, FetchRSSFeed Function RSS Feed Receive करने के लिए AJAX का use करता है, और फिर Defined HTML Container में प्रत्येक Item को Parse और Display करता है।