Query XML with Namespaces using XPathNavigator


Querying XML data which has namespace qualifications can be a little confusing at times, consider the following document; This example is declaring a default namespace qualification at the root of the document, which scopes the inner part of the document to the default namespace, which in this case is http://platinumdogs.com/schema/reporting/query. Given this example you might … Continue reading Query XML with Namespaces using XPathNavigator

Using XMLSchema dateTime formatted DateTime’s in .NET


This is here mostly for my benefit as I keep forgetting it, but this stuff is all over the internet. Consuming and producing xmlschema dateTime formatted values is straightforward enough when you know the specification (see the link), briefly it is; YYYY-MM-DDThh:mm:ss[.fff][zzzz] The .NET class XmlConvert can be used to convert dateTime values between string … Continue reading Using XMLSchema dateTime formatted DateTime’s in .NET

Export SQL Server 2005 Xml Column Data to Xml File


Xml data stored using the SQL Server 2005 xml data type can be exported a number of ways and you can obviously write a managed stored procedure to do it. However for a quick, one off, type approach you can use the BCP command. The downside of this is that, given the command above you’ll get … Continue reading Export SQL Server 2005 Xml Column Data to Xml File