File Transer and Conversion [2005]
I have what seems like a simple problem, but am not sure as of yet, since I am still relatively new to .Net 2.0.
The scenario: I need to retrive an xml file via the http protocol, using just a form and a button. The form would get the file and send it back to a network folder. I have an understanding of this part of it. What I am not sure of is this: The xml file needs to be converted into a some type of a dilimited csv file in the process of being saved. Make sense?
If there is anyone out there who could lend some much needed assistance, I would be extremely grateful.
Re: File Transer and Conversion [2005]
You can read the XML file using and XmlDocument, although there may well be better ways. I'm not too experienced with XML. You may be better to use an XmlNodeReader or an XmlTextReader. I've never used either so you'd have to read up on each method. Once you have the data you can use a StreamReader to write your CSV file, or else something like My.Computer.FileSystem.WriteAllText.
Re: File Transer and Conversion [2005]
Ok, here is a better explanation (please bear with me on this):
The following is sample xml from an xml file. Following you see what needs to be done:
<?xml version="1.0" encoding="UT-8" ?>
<Available Batch>
<Available>
<Part>AABBCC</Part>
<Location>20</Location>
<Qty>500</Qty>
<Available>
<Available>
<Part>AABBCC</Part>
<Location>60</Location>
<Qty>0</Qty>
<Available>
<Available>
<Part>AABBCC</Part>
<Location>100</Location>
<Qty>0</Qty>
<Available>
</Available Batch>
</xml>
*********************************************************
Ok, here is the fun part:
I need to add the quantitys of locations 20 and 100, but ignore location 60
I need to have the ending numbers to have 20 blank characters
I need to have the quantity set as zero-filled
I need to have the information sent via ftp to a server every 30 minutes
So, basically, it should strip out all of the remaining xml content, and have only three fields: Part, Location, and Qty.
Not exactly sure how to manage this. I can get the file and stream it back, which is not a huge issue. However, the conversion of the xml is what I don't quite understand.
As this is extremely urgent, any assistance would be absolutely wonderful.
Re: XML conversion and print software
Here's the problem with that. XML data by it;s nature is heirarchical.... flat files are not. So it makes it difficult to genericaly say, this is how you should do it.
You may want to start a new thread.... this one is 4 years old.... and is in the Classic VB forum.... you'll want to post int he VB.NET forums...
=-tg
Re: File Transer and Conversion [2005]
For anyone willing to write the app, I would be willing to talk about some type of compensation.