Archive for March, 2009

Update XmlHelper v1.01

I’ve updated the code for XmlHelper by adding two methods that I had forgoten about untill I needed them this afternoon.

        /// <summary>
        /// Attractively format the XML with consistant indentation.
        /// </summary>
        /// <param name="strXML">A well formed XML string</param>
        /// <returns>An XML string with carage returns and indentations</returns>
        public static string PrettyPrint(string strXML)
 
        /// <summary>
        /// Attractively format the XML with consistant indentation.
        /// </summary>
        /// <param name="doc">The Xml Document you want to convert</param>
        /// <returns>An XML string with carage returns and indentations</returns>
        public static string PrettyPrint(XmlDocument doc)

both will take this :-

<?xml version="1.0" encoding="utf-8"?><NewDataSet><Foo><Bar>abc</Bar></Foo></NewDataSet>

to this :-

<?xml version="1.0" encoding="utf-8"?>
<NewDataSet>
  <Foo>
    <Bar>abc</Bar>
  </Foo>
</NewDataSet>

You can find XmlHelper v1.01 under projects, as always if anyone wants to suggest other methods or if you are using it and find a bug let me know…

Falling behind again…

Well as allways I keep forgetting to post here, and that’s not good.

Tonight I had another great train journey. I normaly get home around 7:45pm, after the train was held outside my stop for an hour . I got in my car to find I had left the lights on dipped and now had no power, I might have cryed if I wasn’t so manly, once wife had rescued me and we drove home it was around 9:20pm, this dosenot make for a good night for coding.

I’ll try and do some code or a tutorial by the end of the week, don’t laugh!