Thursday, 15 July 2010

axapta - X++ Append Text to String -



axapta - X++ Append Text to String -

i have method appends 2 strings based on tag in xml file beingness loaded. add together unique key between these 2 strings parsing reasons later. below examples of way working , do.

-current: strvalue~&elem.text()~& -goal: strvalue~&elem.text() // if tag "tag" or "building append text strvalue (part of item name) elem = elemtag.selectsinglenode("ofda:type",nsmgr); if(elem && (elem.text() == "tag" || elem.text() == "building")) { elem = elemtag.selectsinglenode("ofda:value",nsmgr); if(elem) { strvalue += elem.text() + "~&"; } }

strvalue += strvalue ? "~&" + elem.text() : elem.text(); ?

axapta x++

No comments:

Post a Comment