Sunday 17 August 2014

Using XML with DOM, Good and bad points

XML is actually a meta markup language containing its own set of tags, permitting richly arranged documents to be transmitted and presented over the web. Just before this web developers had the usage of HTML and SGML to showcase website content on the internet, however both SGML and HTML had a variety of constraints which made them inappropriate and in reality limited with regards to lots of the then promising technologies and calls for of the net, like displaying rich and dynamic data.

XML is a bit more suitable simply because its much more accommodating than HTML or SGML, hence the X, which symbolizes Extensible, for this reason XML is needed for displaying rich data since its more suitable than its nearest alternatives.

In fact XML contains a number of advantages for web designers and developers alike, these kinds of positive aspects include firstly and most clear of all, content owners can produce their own custom docs a result of the flexibility of being able to make custom tags. XML tags do not carry semantic meaning so programmers can create their own tags. This isn’t likely with XML or SGML.

Secondly, the other big advantage, as mentioned already, is the fact content like hyperlinks can be displayed in a much richer format due to the sophisticated features and functionality of XML in comparison with HTML.

XML offers much more superior facilities in the manner content is presented in web browsers not to mention terrific developments in functionality in particular in relation to dynamic content.

The main reason for this boils down to compression powers, XML is organized very well which makes it quite simple to compress, this amount of order and structure just isn't present in ordinary text and so XML offers a faster browsing experience.

Together with the good points already mentioned, its also correct to mention several of the disadvantages of XML, which although not substantial, its vital that you mention for sake of completeness.

The most obvious and well known of such weaknesses is that XML could be rather large and verbose from a programming viewpoint, and that's why in the subject of web services JSON is becoming incredibly popular to the detriment of XML.

However this doesn't have to be a major issue, it all depends on what you intend to employ XML and ways in which you want to work with it. Another point to note is that there exists nonetheless a lot of disparity in terms of criteria and interoperability etc. Because of the many different technologies and also the rapidly changing nature of XML there are still gaps between XML related technologies including XSL and XSLT.

In relation to working with DOM. Microsoft have provided an MSXML parser which lets you load and parse your XML files, this takes a lot of the pain away from working with XML. The parser functions by showing your XML file as a DOM (Document Object Model), this lets you gather specifics of the xml file, to govern it also to navigate through the file, elements, attributes etc.

To summarize, there are a number of strengths and weaknesses to XML and employing DOM parsers is a fantastic way to parse XML files, you can also use XML tools, which save you time whenever using XML.