Created
July 11, 2017 18:50
-
-
Save EliJDonahue/cb868d27bdffa94c0efa265d7ef601aa to your computer and use it in GitHub Desktop.
Demonstrates the Aras Best Practice of building a single AML statement instead of combining items with appendItem()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string myAml = "<AML>"; | |
for (int i=0; i<10; i++) | |
{ | |
myAml = myAml + "<Item type=\"CAD\" action=\"add\">"; | |
myAml = myAml + "<item_number>" + "Test " + i + "</item_number>"; | |
myAml = myAml + "</Item>"; | |
} | |
myAml = myAml + "</AML>"; | |
Item res = inn.applyAML(myAml); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A couple of concerns with this example
System.Text.StringBuilder
orSystem.IO.StringWriter
&
,<
, or>
in the user input.I forked this example and made some tweaks to address both concerns.