alt
Advertisement
Sponsored links
Online Training
Career Series
Exforsys
Exforsys arrow Tutorials arrow XML arrow Working with XML in Python
Site Search


Working with XML in Python
Article Index
Working with XML in Python
Abilities of Python

Working with XML in Python

The Extensive Markup Language and Python are two very different platforms. Python is a programming language and XML is a standards oriented language document. Python is a full fledged programming language which has its roots deep in scripts, and also has matured over a period of time. XML is still evolving as a tool, and is much smaller in scale when compared to Python. The application of the Python and XML combination comes into picture only when you have to work with XML on different platforms, or in a distributed environment.

Shell script and Perl is used to process the text in the XML document, and then Java API is used to process XML documents and programming in networks. The shell provides a facility to manipulate the files, and as a platform for interaction with Unix, Perl helps to manipulate the text, therefore providing access to the UNIX servers. But all these together were not efficient in manipulating XML text which was then overcome by Python.

Like any other scripting language available, Python has the ability to manipulate both text and files. Before the use of Python developers were largely dependent on a combination of programming languages to carry out various functions on a single file. But with the advent of Python the dependency has turned into efficiency because it can handle all the functions that various programming languages were doing on its own. Due to this, Python invariably became the best choice to be used along with XML.

Python along with its other qualities can also support object oriented files and has a robust environment. This environment can be extended to networks, graphic user interface, and web development and can be combined with components like C ++ by connecting them to libraries. Python is also easily transferable across networks and embedded systems, and it is portable with almost every platform on the network.

Python when compared to other programming languages like C or C++ allows you to develop at an increased speed. Python is also a much simpler language, and work along with XML. But If your requirements are speed sensitive then you can incorporate the elements of C or C++ into your program landscape.

Advantages of XML with Python

XML has its own advantages as a data language on the internet, and it is the number one choice for programmers. These advantages were built into XML right from the beginning and were meant to provide the programmers with an edge.

XML has a human interface where humans can read it, and it also has a machine interface where machines can understand it. So it also acts like an interpreter. Though this might look very simple, actually it is a phenomenal aspect.

For example a word document can only be read in word, and in no other interface. It is not flexible by itself. If you try to open a word document with a text editor, all it does is turn in binary characters which can be very annoying for a programmer.

XML is a very neutral application when compared to all these phenomenons. The XML document is always presented by a parser or a processor, but in case if a parser or a processor is not available, it still can be read and parsed. Such is its flexibility. Data within a XML document is not limited to any software application which is using it.

XML makes the data independent of any factors, and this also makes it easily accessible. The ability to read data easily is extremely importantly in case the whole system crashes, as then you need something which is independent like XML to be able to access data.

XML is hierarchical in structure and allows you to create hierarchies using tags, and it creates a structure in the shape of a tree. It is quite different from HTML because you can create this with different kinds of elements in XML. This feature makes the Extensive Markup Language appropriate for data which is in serial form. It is very easy to create a mapping from elements to data objects.

A Neutral Platform

XML creates a neutral platform because of its cross platform functions. The text codes that are used in XML are so varied that it avoids all confusion in cross platforms when it comes to arranging a XML document. The design of XML is to facilitate its usage on the Internet with HTTP and SSL, and various other protocols including the futuristic ones which are being built.



 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape