What Is a Parser

If you want to read, update, create, or manipulate any XML document, you will need an XML parser. A parser is a software engine, usually a dynamic-link library (DLL), which can read and extract data from XML. Microsoft Internet Explorer 5 or higher has a built-in XML parser (MSXML.DLL, MSXML2.DLL, and MSXML3.DLL) that is capable of reading well-formed documents and detecting those that are not. MSXML has its own object model, known as DOM (Document Object Model), that you can use from VBA to quickly and easily extract information from an XML document. To ensure that you are working with the most recent XML parser, checkout the following link: http://www.microsoft.com/downloads/ details.aspx?familyid=4a3ad088-a893-4f0b-a932-5e024e74519f&displayl ang=en

An XML document must also be valid. When a document is valid, it follows the predefined rules for valid data. These rules are defined in a Document Type Definition (DTD) or a schema. Schemas are written in XML and define the rules that make an XML document valid. DTD is an old method of data validation. Later in this chapter you will see how Access uses a schema to determine the type of elements and attributes an XML document should contain, how these elements and attributes should be named, whether they're optional or required, their data types and default values, and the relationship between the elements.

Because of its extensibility, XML makes it easy to describe any data structure (structured or unstructured) and send it anywhere across the web using common protocols such as HTTP (HyperText Transfer Protocol) or FTP (File Transfer Protocol). Although XML was designed specifically for delivering information over the World Wide Web, it is being utilized in other areas, such as storing, sharing, and exchanging data. Because XML is stored in plain text files, it can be read by many types of applications, independent of the operating system or hardware.

0 0

Post a comment