background preloader

XML

Facebook Twitter

MSDN Samples Gallery. XML Standards Reference. Extensible Markup Language (XML) is a simple flexible text format that can be used as the basis for creating new markup languages that can be used in document publishing and data exchange. XML is based on a series recommendations published by the working groups of the World Wide Web Consortium (W3C) and is therefore well suited (though not limited) to use in Web-based applications.

At Microsoft, our engineers contribute to the efforts of the W3C working groups who define and set standards for XML and other Web protocols. Wherever possible, we strive to achieve full compliance with the XML standards once they are stable and published as recommendations by the W3C. Among the XML standards Microsoft currently provides developer support for are the following: The XML Schema definition language (XSD), a current W3C standard for using XML to create XML Schemas. Build Date: PowerShell 2.0: One Cmdlet at a Time #21 Select-XML @ Jonathan Medd's Blog. Continuing the series looking at new cmdlets available in PowerShell 2.0.

This time we look at the Select-XML cmdlet. What can I do with it? Search for text in an XML document using an XPath query. Example: Example.xml From the file Example.XML search with the XPath query /shop/food Select-XML -Path example.xml -XPath "/shop/food" You’ll notice this hasn’t returned any actual data from the XML file rather details of the search carried out and two matches.

To retrieve the results pipe the SelectXMLInfo object through to Select-Object and use the ExpandProperty parameter. Select-XML -Path example.xml -XPath "/shop/food" | Select-Object -ExpandProperty Node How could I have done this in PowerShell 1.0? You could have used the Get-Content cmdlet to read the Example.xml file in as text, converted it to an XML type using [XML] and then used the SelectNodes method to retrieve the data.

[xml]$xml = (Get-Content example.xml) $xml.SelectNodes("/shop/food") .NET and XML: XPath Queries. The W3C (the World Wide Web Consortium, published the XML 1.0 specification on February 10th, 1998. The XML 1.1 specification was published six years later, on February 4th, 2004. In these six years, XML has taken the industry by storm. XML has become the standard for how to describe and exchange data. The current primary development platforms, .NET and J2EE, support XML natively. All modern enterprise applications—may it be a SQL Server or Oracle database, a BizTalk Server, an Office suite or any of the other thousands of applications—support XML to various degrees. You will be pretty hard pressed to find an application that does not support or use XML.

There is more to XML then just a way of describing data. This article begins a series. The Sample XML Document for the Series of Articles This series of articles assumes that you are familiar with XML itself. <? The Fundamentals of XPath Queries //Employee Page 1 of 2. Using Open XML SDK v2.0 on Windows Azure. Generating Word/Excel reports is a fairly common requirement. Now that we intend to migrate our application to the cloud, we realize that on Windows Azure you do not have Office DLLs or in fact, any other (unnecessary from Azure’s perspective) DLLs available to you.

You can always package Office DLLs with your app deployment package and use them in your application on Windows Azure (You can find articles on the blogosphere about how this can be done). I opted for using Open XML SDK v2.0 available here. I Can generate Word / Excel reports on the fly. Here’s a sample code to write to create a Word Document Now that we have everything in place we want to deploy this “Report Generation Solution” to the cloud, but first we'll run it locally on the compute Emulator.

Everything seems to be working, Next step is to deploy your application to your Azure account. This blog post talks about a known issue on using Open XML SDK in .NET 4 Roles on Windows Azure. Mvp.Xml Project. Mvp.Xml project is developed by Microsoft MVPs in XML technologies and XML Web Services worldwide. It is aimed at supplementing .NET framework XML processing functionality available through the System.Xml namespace and related namespaces such as System.Web.Services. It is documented extensively through weblog posts. All the project's classes contain extensive tests to ensure its quality, as well as the peer review among this highly focused group of XML lovers.

Mvp.Xml project currently provides .NET implementations of the EXSLT, XML Base, XInclude, XPointer as well as a unique set of utility classes and tools making XML programming in .NET platform easier, more productive and effective. Mvp.Xml project supplements .NET functionality, but as .NET platform evolves some parts of the Mvp.Xml library become redundant. Mvp.Xml project provides the following tools: Note: development for the .NET 1.1 is over.