- slide 1 of 3
Understanding XML Methods
XML means Extensible Markup Language. To really understand what XML and XML methods mean, we need to first know what a markup language is. Markup Languages are designed for the presentation, processing and definition of documents containing structured information. This language deals with the codes for formatting both the layout and style in a document or text file. Another good example of a widely known and accepted markup language is HTML. Now what is the key difference between XML and HTML since they’re both markup languages?
HTML is designed to display data while focusing on what data looks like whilst XML is for the transport and store of data with a focus on what data is, therefore HTML and XML cannot replace each other as they are both vital and unique . To understand XML further we need to know why it was created. The main reason for XML is for data to be exchanged over the web following fundamental XML methods.
XML has wide applications on the Internet however a well known use of it is in RSS (Really Simple Syndication) feeds, which are used to deliver regularly changing web content. Today many weblogs, news sites and other online publishers syndicate their content as an RSS Feed to anyone that wants the data regularly and on time, and these RSS feeds are actually nothing but XML files.
- slide 2 of 3
The XML DOM specifies a standard for accessing and manipulating XML.The (DOM) is a W3C Document Object Model that is a language-neutral and platform independent interface that enables programs and scripts to dynamically access and update the content, structure and style of a document.
The DOM defines the objects and properties of all document elements, and the methods (interface) to access them. The DOM in reality is what defines the properties and objects of all document elements, and the methods(interface) or XML methods (when applied to XML) to access them. Properties and methods define the programming interface to the XML DOM.
- slide 3 of 3
XML Methods Categories
XML Methods are divided into 3 parts or categories which are as follows:
- x.appendChild(node) -This inserts a child node to x (Please note x stands for a node object and a node object is the primary data type for the entire DOM and can be an element node, an attribute node, a text node etc)
- x.removeChild(node) –This removes a child node from x..
- x.getElementsByTagName(name) – This gets all elements with a specified tag name
XML is a syntax based markup language and you must follow the right syntax or XML methods before an XML file can execute. By following the above XML methods or syntax you can be sure of writing functional XML codes that will meet any requirement you apply them to in the transportation and storage of data.