Serializing C# objects using the .NET framework is a simple task, as is shaping the XML which results from serializing a C# object in terms of XML elements, attributes and namespaces. However, whats not so straightforward, or at least sparsely documented, is controlling what if any namespace and Xml declarations are emitted during serialization. The [...]
Read moreSharePoint: Non-InfoPath XML Form Property Promotion and Demotion
In a previous post, I described how you could provision SharePoint promoted property columns for InfoPath forms using code, rather than using the InfoPath client designer. In the same vane, this post demonstrates how to support non-InfoPath XML forms in SharePoint; Using the SharePoint built-in XML parser to automatically determine the content type based on [...]
Read moreXSL Transformation with SPSiteDataQuery
This post demonstrates how to take the data returned from an SPSiteDataQuery query, convert it to XML and then to transform the XML using XSLT for presentation. The features described in this post include; A basic XSLT transformation stylesheet Loading an XSLT transformation stylesheet from the content database Supplying parameters to the XSLT transformation engine [...]
Read moreSharePoint: Load a Text File from the Content Database.
Loading a text file from the SharePoint content database should be straightforward, and it is, kind of. The work I’m doing right now requires me to load XML and XSL files provisioned into the content database. Initially I figured I’d use the GetFileAsString method of SPWeb. Despite numerous posts extolling the virtues of this method, [...]
Read moreQuery 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 [...]
Read more

June 15, 2010

