Archive for the 'XML' Category

XML - How To Display An XML Feed On Your Website

Tuesday, February 7th, 2006

Really Simple Syndication (RSS) has taken off in a big way. Just as satellite television beams more channels into your home than you can watch, RSS allows to you display an endless amount of other peoples content. Whilst RSS XML feeds are plenty, there’s not as much in the way of clear, simple instruction when it comes to making use of those feeds.

If you’re one of the webmasters who uses a content management system that makes using RSS XML feeds as simple as specifying a feed URL then you’re fortunate in that respect. For others, the options available tend to be offered by developers of the software and the usage instructions provided can often be riddled with technical jargon. Many cry, “Use my feed”, but fewer tell you how.

One of the best and easiest ways I’ve found to show the content from an RSS XML feed on one of my websites is to use a ready made PHP parser. Now, don’t worry about what that means, just think of it as somthing that someone has already created; a blackbox that makes it easy for you to use content from RSS feeds and display it on your website.

For this guide, I’ve used MagpieRSS because it’s compact, works well and is distributed under the GPL, which basically means it’s free for you to use. Now, MagpieRSS is written in PHP so you’ll need a compatible hosting account that allows you to execute PHP scripts.

For the purposes of this guide, I’m assuming you’ve some level of basic knowledge about websites e.g. you know how to FTP, change file permissions etc. Covering the basics of running a website is beyond the scope of this article.

Instead, let’s cover what are probably the most difficult steps; displaying the content from an RSS feed on your website.

1. Download the latest stable release of MagpieRSS.
2. Extract the contents of the ZIP file onto your computer.
3. The core files you need from the ZIP package are rss_cache.inc, rss_fetch.inc, rss_parse.inc, rss_utils.inc. You’ll also need the extlib folder together with the Snoopy.class.inc file inside of it.
4. Create a new file to display your RSS feed. I’ve called mine, index.php. Inside this file, copy and paste the contents of the file referred to below and save it.
5. Upload all of the files and the folder mentioned in steps 3 and 4 to your hosting account. Put them into the desired location, but ensure that the Snoopy.class.inc file is still within the extlib folder.
6. Then visit the file you created in step 4 using your web browser.

That’s the basics of it. Once you’ve got this far, customising the way you present the content of the feed is relatively easy. Just refer back to the MagpieRSS website for guidance on how to do this.

About the Author: William Lee is the Internet Marketing Fool. The MagpieRSS website is http://magpierss.sourceforge.net/. The code to copy in step 4 can be found at http://snipurl.com/example_code.

XML - Creatring XML, HTML and TXT sitemaps for webmasters

Tuesday, February 7th, 2006

>

If you own or maintain a website or intend to own one, wouldn’t it be great if you get frequent visitors who find satisfaction in getting exactly the information they need from your page?

While that satisfaction largely depends on the contents of your website, how you get to be accessed by website users is the most critical factor of website development. For if your website can’t be reached universally, you defeat the very purpose of the internet: that is, to make information available to any website user from across the world.

How you get to be accessed is actually a matter of presentation style, organization, and most importantly, how fast and extensive search engines get to lead users to your website. Unless your pages are indexed in the search engines they can’t send you the free visitors you are all looking for.

Fortunately, the search engines want your content too and there are a number of ways you can help them, which they encourage you to do - by creating sitemaps of your website. Sitemaps created for the various search engines will enable these search engines’ spiders to crawl faster, more systematically, and more extensively into your website’s pages.

By doing so, you get the maximum exposure you can. Such exposure will boost your pride in having your pages viewed, read, and used by more and more visitors the way you intended them to. On the financial aspect, the more visitors your website gets, the higher your website’s potential advertising value.

Now with the vast expansion of websites on the internet, it has become necessary to create different types of sitemaps, each having its own complexity in setting up.

HTML Sitemaps

Creating an HTML sitemap linked to and from your home page is something savvy webmasters have been doing for years and perhaps is the simplest to create. This sitemap is simply a list of pages contained on your site and enables the search engines spiders to easily find your pages, especially the ones that are linked deep in your website that they may have trouble finding otherwise.

TEXT Sitemaps

A text sitemap is simply a list of the URLs of your site in the form of a text file. These can then be submitted to search engines such as Yahoo! to notify them that all the pages exist and by doing so invites their spider to visit.

XML Sitemaps

Google launched Google Sitemaps as a way for webmasters to give them information they could use to better crawl their sites. This involves creating an XML Sitemap for which they provided their Google Sitemap Generator. This can be the most complicated to set up using the tools provided by Google as you need to be running Python on your server. It’s perhaps the most important one too given the current dominance of the search engine.

Setting up all three types of sitemaps may seem a daunting task but luckily there are websites that take the strain out of this and you can create all three within a matter of minutes.

XML-Sitemaps.com is one such site. Originally developed to easily create Google sitemaps for webmasters without an understanding of Python, it has evolved through demand for new features.

It offers the Sitemap Generator that lets you build your sitemap online in four simple steps, for free! The Sitemap Generator is easy to use and user-friendly even for average computer literates. Just type in your URL and other parameters (e.g. frequency of change or update that your website will likely undergo, the priority of a specific URL relative to the other pages on the same website, etc.) and follow the ensuing instructions until you get to add your URL to the Google Webmaster account. You will then be given the options to download your websites sitemaps in XML, HTML and TXT format. If still you get stuck with a step, you may enquire and get assistance from its technical support.

Go check xml-sitemaps.com for more details or better yet, to get started!

The only limitation of the free sitemap Generator is that it allows only up to 500 pages per website. Still, this limit is high. Statistics show that out of the more than 64000 sitemaps generated using this service, the average website size was only 155 pages, way below the 500-page limit. This figure is represented by 78% of all webmasters who have used the Generator.

However, in case your website falls beyond this limit, you may check out the PHP Sitemap generator script. Offered at a very reasonable price, this stand-alone script is intended for unlimited-sized sitemaps, which is beyond the capacity of online services.

Whichever search engine or for whatever search purpose, sitemaps are clearly the fastest and most efficient way to navigate this digital highway. The best thing about it is, with these easy-to-use sitemap generators, you don’t have to be a computer geek to help keep this internet traffic moving.

About the Author

Philip Nicosia is the webmaster of <a “http://www.xml-sitemaps.com/”>XML-Sitemaps.com, a site specialising in sitemap software that generates XML, HTML and TXT sitemaps for webmasters.

XML - Understanding XML Server

Tuesday, February 7th, 2006

XML Server can be a Web Server that stores the XML files in it and serves them on demand. The XML Server would have processing capabilities with an XML engine and to transform the XML document to other forms. Basically a server which hosts and serves the XML documents is called a XML Server.

There are many commercially available XML Servers in the market. The popular among them are the Tamino Server, the Sonic Server and the FDX XML Server. Though the basic functions of these servers are same the way they are implemented and the features that they support varies.

The Tamino XML Server is from Software AG and is used to publish and exchange all kinds of data especially the XML documents in the native format. It handles open standards. Leveraging on the XML technologies will improve an organizations data access.

Exchange of data between different applications on different platforms is possible using XML technologies. Hence organizations are moving on to store their data in XML format to take advantage of the XML technologies. Storing the data in XML format improves the performance of delivery and scalability of your applications with low operational and administrative costs.

In traditional relational databases, data is stored in rows and columns which can be too complex. But in the case of an XML Server such complexity is avoided and any data can be stored which includes even multimedia files and even relational data. These data can be easily retrieved at lightning speed using a Tamino XML Server.

To retrieve data that is requested by any application, XQuery is used in Tamino XML Server. This server implements the XQuery specification draft. Hence queries on the server can be issued using the internet and data can be returned in any format by using XSL style sheets. Thus the customers can manipulate the format of presentation of the data that is presented using style sheets. High speed retrieval of data is possible in XML Server.

The Tamino XML Server is robust, reliable, and scalable. It is used in mission critical environments and there is almost no failure and loss of data. It is reliable in the sense it supports backup of data that can be stored in external devices or remote devices and used in clustered environments. The number of users can be increased and the load on the server can also be increased.

The document structure can take additional elements without changing the entire structure of the data store. These characteristics of the XML Server help it to be used in mission critical environments. Developers can develop XML applications very faster by using Tamino XML Server. It can be easily integrated with application servers.

FDX XML Server is another XML Server available in the market. This product is created by Snapbridge. This server is also used to create and deploy sophisticated XML applications. XSL, XSLT and scripts are supported in this server so that data can be transformed to any format requested by the user or any other application.

Sonic XML Server is another product from Sonic software which is built upon the native XML processing engine. This helps in pipelined processing of XML documents which eliminates the need for generating intermediate xml text file for processing. This improves the speed of the transaction dramatically.

This pipelined processing of the document helps in very large and complex processing tasks to improve the speed of those tasks. The in-built engine in the Sonic XML Server enables a user to store any size of XML document in it and to query, retrieve and update that data.

We have seen that an XML Server is any server that gives an XML document as an output so that the other applications can use it for processing. The document can be delivered in any format using XSL and XSLT engines. It is possible for us to write some code in ASP which will serve an XML document to the user when they view that ASP page. We can store this code in a web server and this code can be said to be a very simple XML Server since it serves the user with an XML document.

About the author:
Want to stay current with the latest technology developments realted to XML. Visit http://www.xml-training-guide.comto get your FREE subscription now!

** Attention Webmasters / Website Owners **
You can reprint this article on your website as long as you do not modify any of the content, and include our resource box as listed above with all links intact and hyperlinked properly.

XML - Overview of XML Encryption

Tuesday, February 7th, 2006

XML encryption classifies a course of action for encrypting plain text data, generating ciphertext, and decrypting the ciphertext to retrieve the plaintext data.

XML encryption classifies a course of action for encrypting plain text data, generating ciphertext, and decrypting the ciphertext to retrieve the plaintext data.

Both the and are optional i.e. the sender and receiver may agree on the encryption method and key in advance. Several elements use the definitions from the DSIG.

If the recipient does not know the decryption key in advance, then the sender generates and sends it. The key can be protected in transit by encrypting method or key agreement.

If the plaintext data to encrypt is an XML element or content, you encode it using UTF-8 and perform any necessary transforms to it, otherwise, if it is an external resource, you simply consider it as an octet sequence. You then encrypt the data, creating CipherValue, which you place in EncryptedData.

Care must be taken when signing content that may later be encrypted; clearly; the content must be restored to exactly the original plaintext form for the signature to validate properly. To restore the plaintext in the signed content, use the decryption transform method for XML signature defined by the XML encrypt joint W3C and IETF working group.

This transform also allows specifications of XML fragments that were encrypted and then signed with rest of the document and, therefore, are not decrypted to validate the signature. Often, encrypted fragments are removed from the signed information by using the XPATH transform in the reference element, since the meaningful information is the plaintext.

We can sign the plaintext version of an encrypted element by including the appropriate reference element pointing to it. When the signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in which the recipient forwards the signed confidential document to a competitor, encrypted by the competitor public key, trying to make it look as if the sender sent the confidential information. To prevent surreptitious forwarding, the signer should append the recipient identities to the document being signed.

If the recipient does not know the decryption key in advance, then the sender generates and sends it. The key can be protected in transit by encrypting method or key agreement.

If the plaintext data to encrypt is an XML element or content, you encode it using UTF-8 and perform any necessary transforms to it, otherwise, if it is an external resource, you simply consider it as an octet sequence. You then encrypt the data, creating CipherValue, which you place in EncryptedData.

Care must be taken when signing content that may later be encrypted; clearly; the content must be restored to exactly the original plaintext form for the signature to validate properly. To restore the plaintext in the signed content, use the decryption transform method for XML signature defined by the XML encrypt joint W3C and IETF working group.

This transform also allows specifications of XML fragments that were encrypted and then signed with rest of the document and, therefore, are not decrypted to validate the signature. Often, encrypted fragments are removed from the signed information by using the XPATH transform in the reference element, since the meaningful information is the plaintext.

We can sign the plaintext version of an encrypted element by including the appropriate reference element pointing to it. When the signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in which the recipient forwards the signed confidential document to a competitor, encrypted by the competitor public key, trying to make it look as if the sender sent the confidential information. To prevent surreptitious forwarding, the signer should append the recipient identities to the document being signed.

ABOUT THE AUTHOR

Pawan Bangar,
Technical Director,
Birbals,India
email:
www.ebirbals.com
www.birbals.com