hi Gauri.,
    thanks for the code and your help i will try this code and check ....and 
will surely let u know if i face any difficulty and once again thanks for the 
code 

Thank U

Regards 

Rinish

 


--- On Sat, 17/1/09, Gauri P. Phanasgaonkar <gaur...@hotmail.com> wrote:
From: Gauri P. Phanasgaonkar <gaur...@hotmail.com>
Subject: RE: [Axapta-Knowledge-Village] Extracting data from Ax3.0 to Xml
To: axapta-knowledge-village@yahoogroups.com
Date: Saturday, 17 January, 2009, 9:28 PM










    
            


Yes, it is possible to extract data from Axapta 3.0 to XML.

 

I usually write a method that returns an XML. If you want to write it to a file 
you could write an ASCII file with the XML data.

 

Sample code to get XML from table:

============ ========= ==

static XML getAllDlvMode( )
{
   DlvMode      dlvMode;
   XML          xml;
   ;

    xml = '<table>';
    while select Code, txt
        from dlvMode
        where dlvMode.dataAreaId == 'sft'
   {
        xml += dlvmode.xml( );
    }
    xml += '</table>';
    return  xml;

}
============ ========= ========= =======

 

Sample code to load and parse XML file:

============ ========= ========= =======

    XMLDocument                 XMLDOM;
    XMLNodeList                 XMLNodes_ItemOut;
    TextBuffer                  tbPurchOrder;

    boolean                     blnXMLLoaded;

    str                            nodeText;

     ;

    XMLDOM              =   new XMLDocument( ) ;
    XMLDOM.async( false);
    XMLDOM.setProperty( "ServerHTTPReque st", true);
    strUNCFileName_ reg      =   strfmt("%1", _strFileName) ;
    tbPurchOrder        =   new TextBuffer() ;
    tbPurchOrder. fromFile( strRTrim( strLTrim( strUNCFileName_ reg)));
    temp                =   tbPurchOrder. getText() ;
    blnXMLLoaded        =   XMLDOM.loadXML( temp);

 

    if(blnXMLLoaded)

    {

         //parse the XMLDOM

         nodeText = strXMLDOM.selectSin gleNode(" path/nodeName" ).text();

    }

 

============ ========= ========= ========= ========= =========

 

 

Sample code to write a file

============ ========= ========= ========= ========= ========= =========

 AsciiIo oAsciiIo;

str strFilePath, strMode, strLog;

;

    //oAsciiIo = new AsciiIo(strFileName , "A");
    oAsciiIo = new AsciiIo(strFilePath , strMode);

    oAsciiIo.write( strLog);

/*

You may use WinAPI static methods to create and manage folders.

e.g.:  if (!WinAPI::folderExi sts(strFolderPat h)) WinAPI::createDirec 
tory(strFolderPa th);

*/

 

============ ========= ========= ========= ========= ========= ========

 

Let me know if you need more information.

 

Thanks,

Gauri.


 





To: Axapta-Knowledge- vill...@yahoogro ups.com
From: rin_...@yahoo. co.in
Date: Sat, 17 Jan 2009 16:32:13 +0530
Subject: [Axapta-Knowledge- Village] Extracting data from Ax3.0 to Xml













Hi friends,
      Is it possible to extract data from Axapta 3.0 to Xml...Let me be clear , 
i am trying to send data from a table in axapta to Xml .. i have a form and i 
have created a button ...by clicking the button the record should be transfered 
to a Xml file ...and is it possable to do the same to extract the entire table 
....If so can anyone get me a sample code which can do these things ....pls 
send me the code ... 
 
      Thank You 
 
Regards
 
Rinish


Add more friends to your messenger and enjoy! Invite them now.

 





Windows Live™: Keep your life in sync. Check it out.

      

    
    
        
         
        
        








        


        
        


      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Reply via email to