This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Code for Importing XML Files....

raviraj - Tuesday, April 19, 2011 6:40 AM:

Hello All

i want to Import All Exported Xml Files automatically in my database by just passing username and password, for that i see for aras Import Tool  but i didnt found handle over aras Import tool. so now i am designing my own Import Tool. so Anybody tell me  How to write code in c#  for Importing Whole XML in to database. OR is there anybody have the code for Aras Import and Export Tool....? Please Help.

 

 

Regards

Raviraj.

 



justinlee - Wednesday, June 22, 2011 11:31 PM:

Hi raviraj

You must read XML files and then convert it to AML by C# and then menthod applyAML() to import data into Aras. When you have a ItemType with name child as the same

----XML------

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root xmlns:xsi="www.w3.org/.../XMLSchema-instance">
    <childs>
        <child>
            <plmid>1</plmid>
            <plmcode>001</plmcode>
            <plmname>Myname</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </child>
        <child>
            <plmid>1</plmid>
            <plmcode>001</plmcode>
            <plmname>Myname</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </child>
        <child>
            <plmid>1</plmid>
            <plmcode>001</plmcode>
            <plmname>Myname</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </child>
        <childs>
</root>

----AML

<AML>
        <Item type="child" action ="add">
            <plmid>1</plmid>
            <plmcode>001</plmcode>
            <plmname>Myname</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </Item>
        <Item type="child" action ="add">
            <plmid>2</plmid>
            <plmcode>002</plmcode>
            <plmname>Myname</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </Item>
        <Item type="child" action ="add">
            <plmid>3</plmid>
            <plmcode>003</plmcode>
            <plmname>Myname3</plmname>
            <plmnote>1</plmnote>
            <plmparent>1</plmparent>
        </Item>
</AML>

P/S: sorry  my English....