I have some third party web service documentation formatted into HTML tables like this (first line is the header):
ElementNum|ElementName|DataType|Length|DecimalPlaces|Description
0123456879|SomeElement|Alphanum|10 |0 |YourMotherTrebek
I need to generate request/response objects based on the rows in this table:
/// <summary>0123456789</summary>
public string SomeElement { get; set; }
The quick and dirty route involved me copying tables from a browser into a text editor and doing find/replaces, but that doesn’t work so well when I get into method documentation where the request object has >300 input fields.
Is T4 or XSLT the way to go for something like this, or is there an easier way?
Don’t ask me to write it for you but you might consider XSLT. It is an incredibly powerful pattern-matching language for transforming XML into anything else. You might at least try adding that as a tag to see if anyone has done something similar.