Vba xml in Excel
XML stands for eXtensible Markup Language.
A Markup language is a language used to format information or data.
HTML is one such example of markup language that is used to format data to be displayed in web browser.
XML differs from HTML in many ways and has extensive use in terms of programming, which are as discussed below:
XML is more than just a markup language.
It is used to format data that both human readable and machine readable.
XML was designed to transport data or sharing of information across applications.
The XML can also store data like a database or excel and be transported as it is.
The XML data can be converted to any form such as Excel table, access table, SQL table, text file and so on.
The XML allows for custom definition of Tag names that adds beauty to the language, instead of some predefined tags in HTML.
This custom tags gives meaning to the data and acts as metadata, that means "data about data".
The following XML code will detail the above discussion:
- <?xml�version="1.0"�encoding="UTF-8"?>
- <Agencies>
- <Contractor>
- ����<name>Bhandhan Servicing</name>
- ����<service_type>Marriage arrangement</service_type>
- ����<description>
- All Services related to marriages
- ���</description>
- </Contractor>
- <Contractor>
- ����<name>VS functions</name>
- ����<service_type>Party arrangements</service_type>
- ����<description>
- Official get together, birthday party arrangements.
- ����</description>
- </Contractor>
- <Contractor>
- ����<name>Swami services</name>
- ����<service_type>Spiritual Services</service_type>
- ����<description>
- ��� Ganapathi homam, New home poojas performed.
- ����</description>
- </Contractor>
- <Contractor>
- ����<name>B Plus Services</name>
- ����<service_type>Blood Donation</service_type>
- ����<description>
- ��� Conducts Blood donation camps, organizing emergency blood donation
- ����</description>
- ����<calories>600</calories>
- </Contractor>
- </Agencies>
As seen above, Every XML file starts with <?xml> tag.
The version indicates the version of the XML document.
The Encoding specifies the encoding format of the data such as UTF-8,ASCII and so on.
From the above doc, it is clear from the first sight of the document itself that, the doc represents the breakfast menu of various food items.
Each tag represents or gives meaning to the information enclosed within.