I'm doing an interface between my supplier database and my company's. My supplier already has an interface (webservice) that waits for a request of information in a xml package and sends the requested info in a xml package.
All I need to do is insert the returned xml file into my database. Is there any easy and clean way of doing this?
The returned xml has a standard format like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<QML version="1.0" timestamp="2001-03-09T18:39:09-08:00" xml:lang="pt-PT">
<Header>
<From>....</From>
<To>...</To>
<Sender>
<Login>...</Login>
</Sender>
</Header>
<RequestList>
<Application businessOperation="ARTICLES">
<ARTICLES>
<ARTICLESHEADER>
<BRAND>99</BRAND>
<NUMBER>ART001</NUMBER>
<DESCRIPTON>My 1st Article</DESCRIPTON>
</ARTICLESHEADER>
<ARTICLESHEADER>
<BRAND>88</BRAND>
<NUMBER>ART002</NUMBER>
<DESCRIPTON>My 2nd Article</DESCRIPTON>
</ARTICLESHEADER>
</ARTICLES>
</Application>
</RequestList>
</QML>
I've managed to get the '<ARTICLES>' into a datatable
Assuming my table structure is the same as the xml file, is there any way of saving this to the database without having to loop for each entry of the datatable?
Also I have to do the oposite: The suplier's interface asks for some products and I have to build a xml file with this very same structure. Is there any easy way?
Thanks.
NetAngel
All I need to do is insert the returned xml file into my database. Is there any easy and clean way of doing this?
The returned xml has a standard format like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<QML version="1.0" timestamp="2001-03-09T18:39:09-08:00" xml:lang="pt-PT">
<Header>
<From>....</From>
<To>...</To>
<Sender>
<Login>...</Login>
</Sender>
</Header>
<RequestList>
<Application businessOperation="ARTICLES">
<ARTICLES>
<ARTICLESHEADER>
<BRAND>99</BRAND>
<NUMBER>ART001</NUMBER>
<DESCRIPTON>My 1st Article</DESCRIPTON>
</ARTICLESHEADER>
<ARTICLESHEADER>
<BRAND>88</BRAND>
<NUMBER>ART002</NUMBER>
<DESCRIPTON>My 2nd Article</DESCRIPTON>
</ARTICLESHEADER>
</ARTICLES>
</Application>
</RequestList>
</QML>
I've managed to get the '<ARTICLES>' into a datatable
Assuming my table structure is the same as the xml file, is there any way of saving this to the database without having to loop for each entry of the datatable?
Also I have to do the oposite: The suplier's interface asks for some products and I have to build a xml file with this very same structure. Is there any easy way?
Thanks.
NetAngel