MSXML

When browsing information concerning websites and programming, you may come across the term “msxml”. Msxml refers to a large collection of software and software support for xml-based applications in computers and on the internet. This article will help you to understand what xml and msxml is, what it does, how to use it, the various forms of msxml, and some other key information that you should know.

What Is XML

XML is a type of programming language used to structure, store, and transport data. XML looks similar to HTML (hypertext markup language) but it is important to know that xml and html are different. While HTML focuses on how a document looks (color, size, etc), XML focuses on structuring the document so that the computer knows what you want. XML is one of the easiest programming languages to learn because the tags used are not predefined. In HTML, the tags are set in stone and you can only use the ones that have been invented by the W3C standard where as XML allows you to create your own tags. It may sound a little confusing but it’s really not.

What Is MSXML

MSXML, also known as Microsoft XML Core Services, is a collection of support functions that make XML easier to use. While XML is pretty easy by itself, MSXML combines XML with other programming languages like Javascript, HTML, C++, and many others. MSXML also provides predefined tags in order to elimate the guesswork involved.

Versions

There have been many versions of MSXML throughout it’s history but versions 1, 2.0a, 2.5, and 2.6 are either obsolete or no longer supported. The main edition of MSXML is version 3.0 which has been shipped along with all of the later versions. Version 4.0 was made to upgrade version 3.0 but did not replace the earlier edition because version 3.0 provides important features that did not need to be replaced. Version 5.0 was made specifically for Microsoft Office applications and works alongside version 3.0 and version 4.0 to provide optimal performance. Version 6.0 was designed to work alongside versions 3.0 and 3.0 as well and all three programs can be running simultaneously. Version 6.0, must like version 5.0, was made to add support for Microsoft SQL Server 2005, Visual Studio 2005, NET Framework 3.0, Windows Vista, and Windows XP SP3.

MSXML Tutorial

Though MSXML is designed to make XML easier for the consumer, MSXML can be rather tricky in itself. Below, we will go over creating a document, loading a document, and adding a new element. Keep in mind, however, that this is just a brief tutorial. MSXML comes with a built-in help function for additional support and you can also find more in-depth tutorials on Microsoft’s website and elsewhere on the internet. This tutorial will be a mixture of XML, javascript, and various other programming languages that you may or may not be familiar with. Because MSXML combines these programming languages to provide you with extensive functionality, this tutorial might be rather complex for beginners.

Creating a Document

Creating an XML document isn’t that hard. You get to decide what the tags are depending on what it is the document is for. For example, if you want to organize a list of addresses, simply save the document as “addresses.xml” or something similar and structure an xml document like the following:

<name>Betty Boop</name>

<line1>1234 NE 27th PL<line1>

<line2>Boston, Mass.12345<line2>

Copy this same setup for however many times you want. Remember that with XML, you can make up your own tags (the < and > symbols) so you don’t have to use the ones that are provided here. MSXML should automatically recognize this structure and help you to complete the document. A more in-depth example can be found here: http://www.aspfree.com/c/a/XML/MSXML-Tutorial/1/

Loading a Document

MSXML provides you with the essential HTML programming to load a document without having to type in a bunch of a strenuous codes. Generally, you should be able to just drag and drop an XML document into an open browser or pull it up with any text program like Notepad. Because XML is a text document, any program that deals with normal text should have no problem with reading it and displaying your document. If you want the document to be active, however, so that you can see your code how it was intended, you can open the document right inside MSXML or any web browser, as well as any other program designed to read XML documents.

Adding A New Element

Each set you add to an XML document (each set of name, line1, and line2) is referred to as an element. Each element has a upc (universal product code) before the content. A upc would look something like <address upc=”75596280822″>. After the upc are the child elements (name, line1, and line2). To add a new element you must place the new element after the the function. There are four functions provided for adding a new element in a XML document. The four functions are:

  • InsertFirst() This function puts a new entry at the beginning of the list
  • InsertLast() This function puts a new entry at the end of the list
  • InsertBefore() This function puts the new entry before the element with the given upc attribute
  • InsertAfter() This function puts the new entry after the element with the given upc attribute

To read a more in-depth tutorial on adding a new element, go to http://www.aspfree.com/c/a/XML/MSXML-Tutorial/3/

Related reading On MSXML

VN:F [1.9.16_1159]
Rating: 0.0/10 (0 votes cast)

Privacy Policy