0
Good evening Everyone,
I would like a help, the structure of my project is according to the image below.
I would like to import data from my table to this 'Arq.xml' file that is inside the project.
I’m trying to do with this code:
dt.WriteXml("arq.xml", XmlWriteMode.WriteSchema);
MessageBox.Show("Dados Exportado com Sucesso");
But it is not writing, then when I put the fullname of another way, it works. But I wanted to save inside the project itself, so that the project has its own xml, without having anything external, I could understand?
this way you will write the file in the folder where the application is running...most likely in the folder
debug
... you can take the xml from the debug folder, put it in the Solution folder and add it in the Solution, just click on the 8th icon of the Solution explorer, and then on include... but it doesn’t make much sense what you want... maybe explain the purpose of it, we can help in a better way– Rovann Linhalis
It’s for educational purposes..., but even so, I didn’t understand your approach, could you explain it to me better, please, please
– Danillo Victtor
you have a Datatable, and you want to export it to an xml file... when you run the
dt.WriteXml("arq.xml", XmlWriteMode.WriteSchema);
it will write the file in the folder in which the application is running... just take the file there and put in the folder of Solution. All right it’s for educational purposes, but what’s the point of having theDataTable
xml in the Solution folder ?– Rovann Linhalis