XML

There are 2 entries for the tag XML

XML readability

XML is great! It provides a very flexible data structure and means to intelligently deal with that data. However the issue with XML i have is it's readability - it's hard to read XML document. Consider this XML-schema code (probably not the best example - lines are truncated): <?xml version="1.0"?><xs:schema xmlns:nant="http://nant.sf.net/release/0.85/nant.xsd" elementFormDefault="qualified" targetNamespace="http://nant.sf.net/release/0.85/nant.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation>NAnt schema generated at 10/14/2006 16:12:51</xs:documentation> </xs:annotation> <xs:complexType name="NAnt.Core.TaskContainer"> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="asminfo" type="nant:NAnt.DotNet.Tasks.AssemblyInfoTask" /> ...

AddExtensionObject and XSLT

Today i had some frustration with passing objects to XSLT using AddExtensionObject. Calling methods from XSLT worked, but not the properties. I did some googling but couldn't find the answer. It seem as if XSLT doesn't support object properties. This is such a nuisance. Update: I found a solution! It turnes out that .NET creates getter and setter methods for each property in IL. E.g. if you had a read/write property Address, the in the ILĀ  it'll have corresponding methods get_Address() and set_Address(string). So you can access property from XSLT by calling "get_[PropertyName]()" method. Tags: .NET, XML, XSLT