I have been using what might be called a kludge that makes my life very easy. In the configurators I look up all my BOM related information in one place, put it all into a table that I then convert to XML. I include the schema which keeps the data well typed. I put this XML into a method string variable which is effectively a Global variable visible everywhere in the method rules. Then when I need to apply the result to a particular material sequence I pass in the sequence number to a routine. This routine turns the XML back into a datatable using System.IO.StringReader. Then I grab the record I need. It works very nicely and makes the code very simple.
That all works greats in an on-premise, I tried the same in Cloud and of course it rejects references to StringReader.
Before I rewrite this to something else figured I’d ask if there is another way to convert a String that contains XML into a datatable/dataset? I can format the data differently (comma Delimited for example) to get the same result but be great if I can make a simple change to the code below.
ItemList is a string that contains the XML.
System.IO.StringReader StringStream = new System.IO.StringReader(ItemList);
System.Data.DataSet ds = new System.Data.DataSet();
ds.ReadXml(StringStream);
System.Data.DataTable dt = ds.Tables[0];