Показать сообщение отдельно
Старый 19.04.2010, 09:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,477 / 846 (79) +++++++
Регистрация: 28.10.2006
kamalblogs: Converting a System.Xml.XmlDocument to XML type in Dynamics ax
Источник: http://kamalblogs.wordpress.com/2010...cument-to-xml/
==============

When interacting with .Net assemblies mostly  Xml is used to send/receive outputs from the external system. Here is a code snippet that tells how to convert a System.Xml.XmlDocument to a Xml string in Ax which you can use for further processing by classes like XmlDocument…
X++:
//CLR Objects
System.Xml.XmlDocument document;
System.Xml.XmlTextWriter textWriter;
System.IO.StringWriter   stringwriter;

//X++ Objects
Xml                      Xml
;

//call to the .Net assembly that returns a XML
document    = processINput(...argument..)

stringWriter = new System.IO.StringWriter();
textWriter   = new System.Xml.XmlTextWriter(stringwriter);

document.writeTO(textWriter);

//Converted to Ax Xml format here
xml        = stringWriter.ToString();
Источник: http://kamalblogs.wordpress.com/2010...cument-to-xml/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.