Marcelo's WebLog

Improving the world one entity at a time (now tweeting on @mlrdev)

Browse by Tags

Tagged Content List
  • Blog Post: Reference of namespaces in OData

    This post is a simple overview of namespaces you will run into when working with OData in the ATOM format. The list is not comprehensive, but you can get pretty far with it. http://www.w3.org/2005/Atom This is the Atom namespace, defined in RFC 4287 . It's used for all "regular" ATOM things like entry...
  • Blog Post: Testing with XPathNavigator.Evaluate

    Continuing from yesterday's post , we'll use XPathNavigator.Evaluate to sketch some helper functions that can be used to test components. For example, if we're testing the results of a transformation or of some custom XML from a REST-ful service, we would probably want to make sure that some elements...
  • Blog Post: Using XPathNavigator.Evaluate

    Today I simply want to call out a somewhat obscure but very useful method: XPathNavigator.Evaluate . Many users of XML components are familiar with APIs such as SelectNodes or SelectSingleNodes . These are declared on the XmlNode class, and are thus available in its subclasses, for example XmlDocument...
  • Blog Post: InfoPath and SharePoint = sophisticated automation without code

    Today I want to talk about how InfoPath and SharePoint allow non-developers to develop some very sophisticated systems. Someone I know was just stepping into a new job, a startup-like organization currently in the process of defining many of their internal business processes. In particular, the process...
  • Blog Post: Layering enumerators

    Now that I've touched upon XmlReader and how it can be used to stream data while allowing clean layering at the same time, I want to touch on the layer-able interface by excellence in the .NET Framework: IEnumerable<T> . You may have also seen the term 'composing' enumerables, but I tend to...
  • Blog Post: Catching streaming exceptions with streaming readers

    About two years ago, I put up a post discussing how exceptions are streamed in WCF Data Services (called ADO.NET Data Services at the time). Today I want to continue from yesterday's post and discuss how the client implements support for this, but first a quick note. I'd like to make sure I clarify...
  • Blog Post: Layering XML readers

    If you've spent any time looking at the new Open Data Protocol Client Libraries on CodePlex, you may have run into the internal XmlWrappingReader class. I'll look into why this was a useful thing to have and what important OData processing aspect it helps with in the future, but for today I want to touch...
  • Blog Post: Add an attribute to an MSXML node

    This question came up in the forums, and I thought it was worth blogging about because there are a number of considerations "off to the side". The original question was whether it's possible to add an attribute to an IXMLDOMNode , without having to downcast to an IXMLDOMElement . The straightforward...
  • Blog Post: DataSet does not validate XML Schema (XSD)

    If you're working with the DataSet class and loading and saving data in XML format, you may have run into a bit of a surprise. Even when you specifically read an XSD schema into your DataSet, when you load data into it, it seems that validation doesn't work - you're still able to pass in data with extra...
  • Blog Post: Moving XML nodes from one document to another

    Today's topic might be of interest for developers that work both in native and managed code, or who are transitioning from one to another. Moving XML nodes from one document to another is a common operation when you're merging content, for example, or when a piece of code produces a standalone document...
  • Blog Post: MSXML 4 SP2 goes out of support in April

    Learn more about SP2 going out of support on the XML team blog. MSXML4 SP3 has been around for over a year now and has had a very positive reception. Get it! Share the good news with your friends! Of course, we're still encouraging everyone to migration to MSXML6 whenever possible, as that's our...
  • Blog Post: Loading a document from a string using XSD

    This question came up recently in the forums, and I thought I'd post some sample code to show how to do it. The idea is this: you can an XML document in a string variable, and you want to load it into a document. You also have an XSD that you want to make sure the XML conforms to. How do you do this...
  • Blog Post: Evil encoding configuration

    This post is the final one for the XmlWriter and StreamWriter encoding series (see parts one and two first). If you ran the original example, you'll notice that the last combination of encodings we wrote produced this output. Stream Encoding: (no stream) XML Encoding: Norwegian (IA5) Unhandled...
  • Blog Post: Encoding fun with XmlWriter and StreamWriter

    This post provides the results for yesterday's post , where we discussed encoding for XML, Unicode and the presence of the Byte Order Mark (BOM). Without further ado, here they are. Let's starts with the first two. The first is an XmlWriter directly over a stream, with Encoding.UTF8. The second is...
  • Blog Post: XmlWriter, encodings and BOM

    Today I want to talk about XmlWriter and the generation of a Byte Order Mark (BOM). XmlWriter provides an API that generates, unsurprisingly, XML. This XML will typically end up as a managed string of characters or possibly a sequence of bytes. Of course, text transformed into bytes implies an encoding...
  • Blog Post: Consuming OData with Office VBA - Part IV (Access)

    Check out parts one , two and three if you haven't - good stuff there! In today's post, we're going to import data into Microsoft Access. I'm going to focus on having the building blocks in place, although in real-life use, you would either make this more general or more specific - more on this later...
  • Blog Post: Consuming OData with Office VBA - Part III (Excel)

    This is part three of a series - you should read part I and part II to have the code snippets handy and follow along. Today we won't be doing anything special with OData itself, instead we'll see how the snippets work across different Microsoft Office products. Just start up Excel, paste in the OData...
  • Blog Post: Consuming OData with Office VBA - Part II

    In case the title didn't give the fact away, this is the second part of a series - the first part is here . This post builds on the code from that post, so make sure you've gone over that before continuing. Last time, we simply got an XML document in the form of a DOMDocument object, and wrote out...
  • Blog Post: Consuming OData with Office VBA - Part I

    This post is the first of a series describing how you can leverage OData information in your Microsoft Office documents and applications using Visual Basic for Applications (VBA). If you're using the newer programming APIs based on the .NET Framework, then you have plenty of support for OData in the...
  • Blog Post: When using an XSLT transformation many times, compile it

    Public-service-announcement type of thing today: if you're going to be applying an XSLT transformation multiple times, be sure to compile the transformation and then reuse it. This saves you CPU time to re-compile them, memory used during the recompilation, memory fragmentation from the increased memory...
  • Blog Post: XslCompiledTransform and large template elements

    When loading / compiling an XSLT document into an XslCompiledTransform instance, we've seen some customers hit an interesting gotcha. In this case, a particular stylesheet had grown over time, through a series of, erm, clipboard operations, to about a 300KB file with a single template . Rather than...
  • Blog Post: MSXML XHTML DTDs - making the web better

    The fix to requests for XHTML DTD files from the W3C Web server has been recently released. Windows Update should offer the fix automatically, but you can download and install the fix manually from the following links for various MSXML versions: http://support.microsoft.com/?kbid=973688 [MSXML4 SP2...
  • Blog Post: MSXML4 SP3, now with a CAB

    Yep, the redistributable CAB for MSXML4 SP3 is now available for download. Now you can deploy the latest / greatest version MSXML4 along with your app. http://www.microsoft.com/DOWNLOADS/details.aspx?familyid=7F6C0CB4-7A5E-4790-A7CF-9E139E6819C0&displaylang=en Remember, of course, that MSXML4...
  • Blog Post: Problems when installing SQL Server 2005 on an upgraded Windows XP SP3 with MSXML6 SP2

    As mentioned in the SQL Server Support Blog , you may find an issue installing SQL Server 2005 if you install MSXML Core Services 6.0 Service Pack 2 on Windows XP SP2, then upgrade to Windows XP SP3, then try the SQL install. Check out that post for more details, along with the KB for the problem...
  • Blog Post: XSLT Timer Released on Code Gallery

    Over this past weekend, the XSLT Timer tool has been released on Code Gallery. This is a very simple tool, that will simply allow you to type / paste in a document and an XSLT stylesheet, and then tell you how long it takes on average to do the transform using the XslCompiledTransform class. Very...
Page 1 of 3 (68 items) 123