ASP.NET charts example: Odin Sphere: Part 2 - Parsing the XML

  • August 14, 2010
  • James Skemp
In part one of this series we covered what we'd be doing, and what model we'd be using for the data. This time we'll parse the XML file that contains the data we need, and populate the objects. Loading the XML file The XML file we'll be loading is located at http://jamesrskemp.com/files/OdinSphere.xml, and to keep it simple, we'll load it in assuming we're on a different server/domain. First we'll need to add the following so we can make use of XDocument.

Read More

ASP.NET charts example: Odin Sphere: Part 1 - Introduction and model

  • August 13, 2010
  • James Skemp
For a while now I've been meaning to work with ASP.NET 4's built-in charting functionality. While I was going to use it alongside my gas tracking, I think I'm instead going to use my Odin Sphere leveling guide, so I don't have to create an XSLT for the output. In this part of the series I'll outline the data model I'll be using, and preliminary setups. Method So that this can easily be deployed anywhere, I'm going to opt not to use the control itself, but rather programmatically create the charts/graphs.

Read More

Vehicle gas DTD .NET objects and XML parsing with LINQ

  • June 10, 2010
  • James Skemp
The code contained below is a rough draft, and will eventually be moved into an assembly, and the code posted. At some point in 2007 I started keeping track of my gas mileage in an XML file, with a custom DTD for validation (and intellisense in oXygen). I present below the code necessary to create an rough object from the XML, and the LINQ to parse it out. C# objects public class Vehicle { public int Id { get; set; } public String Make { get; set; } public String Model { get; set; } public int Year { get; set; } public IEnumerable Fillups { get; set; } } public class Fillup { public int Id { get; set; } public DateTime Date { get; set; } public int MilesTotal { get; set; } public Decimal MilesDriven { get; set; } public Decimal Gallons { get; set; } public Decimal CostPerGallon { get; set; } public Decimal CostTotal { get; set; } public String Notes { get; set; } }</code></pre> LINQ to XML XDocument vehicleGasXml = XDocument.

Read More

iTunes Playlists to Xml - version 1.6 released

  • May 8, 2010
  • James Skemp
Version 1.6 of iTunes Playlists to Xml is now available for download. Download iTunes Playlists to Xml 1.6. Installing and more information If you're new to iTunes Playlists to Xml, I've created a 'product page' for iTunes Playlists to Xml with all the information needed to get started. Upgrading To upgrade from any version of 1.4 or 1.5 you need to replace the following files with those in the above archive:

Read More

iTunes Playlists to Xml - version 1.5.3 released

  • January 10, 2010
  • James Skemp
This application has since been updated. Read about the current version of iTunes Playlists to Xml. Version 1.5.3 of iTunes Playlists to Xml is now available for download. Download iTunes Playlists to Xml 1.5.3. Installing and more information If you're new to iTunes Playlists to Xml, I've created a 'product page' for iTunes Playlists to Xml with all the information needed to get started. Upgrading To upgrade from any version of 1.

Read More

Determine BlogEngine.NET comments that haven't been published - with LINQPad

  • December 31, 2009
  • James Skemp
At the beginning of the month I wrote a post on how to find BlogEngine.NET comments that had not yet been published/approved. Having purchased a copy of LINQPad a short while ago (autocompletion costs, the program with all other functionality does not; give it a try if you develop in .NET - it's very cool), and having got slammed this morning with some spammer who had an hour to kill, I decided to adapt my code for LINQPad.

Read More

XML Schema Definition creation: Journal - Part 3: XSLT sample

  • December 27, 2009
  • James Skemp
Having created an overview of how I wanted to craft a simple journal in XML, I next created an XML Schema Definition for the simple journal to validate against. Having now crafted a Web application to create the XML files I'm able to move onto the prettier aspects of display for the XML files. I've created a sample simple journal that uses an XSLT (XSL Transforms, or extensible stylesheet language transformations) to make the display a little prettier.

Read More

XML Schema Definition creation: Journal - Part 2: XSD file with <oXygen/> XML Editor

  • December 23, 2009
  • James Skemp
In the first part of this series I had outlined a sample layout that I wanted to use for a series of XML files that I would be creating over the course of 2010. This time I'm going to create the actual XML Schema Definition file with <oXygen/> XML Editor, version 11.1. I've been using <oXygen/> since January 2008, and wouldn't trade it for any other XML editor. If you don't have <oXygen/> you can still follow along.

Read More

XML Schema Definition creation: Journal - Part 1: Primary layout

  • December 21, 2009
  • James Skemp
In a previous series, I went over the process of creating a new XML document to store my video games. (Although in that case I used a DTD.) This time I'm going to work on a schema to store quasi-journal entries, which I'm hoping will help with my goal to write every day. What I hope to accomplish Ultimately I want to store a bit of text for any particular day.

Read More

Determine BlogEngine.NET comments that haven't been published

  • December 6, 2009
  • James Skemp
Unfortunately, BlogEngine.NET doesn't currently have a very good way to determine, at a glance, all of the comments that haven't been approved. While this will certainly be coming in a future release, or as an extension, I figured writing something simple to do this would be a good LINQ to XML test for me. You can download the built executable, or play with the code, which is included below. Download the executable (7-Zip format).

Read More