use xml to django forms

I have a project where when someone uploads an XML file from Django admin that files data which is in XML should go to Django forms display in forms. can anyone give me advice how am I suppose to do that in Django ?

There’s no direct connection between the two.

You’ll have a view that can receive the uploaded file and process it, saving the data into one or more models. You’ll then write another view that uses a form built from those models to display the previously-submitted data.

correction to my question I want to upload XML files from Django admin and show that XML file data into to the Django Forms in the view. Can please give me advice how to do it in this too ?

Your view would need to read that file, separate it into whatever data structures you’re going to present in the form, and then display that form in your view.

If you’re going to edit this data (and not just display it), you’re really going to want to copy the data into your database and manage the data through a Model.

how can I edit the XML file in my database after saving it?

The same ways you edit any other data. You can create a Model Form for that model, and create a view to display and save submitted data. Or, you can use the Django admin on that model.

It doesn’t matter that the data is nominally XML text data. It’s still just text.

I saw Serializing Django objects concept in django documentation related to XML . May I know when and what for should I use this concept in gist?

The very first paragraph of that documentation reference explains it as well as I’d be able to.

Will that Serializing Django object apply in my case like converting xml into json and displaying it?

No - at least not based on what you’ve posted so far.

What I’m getting from what you’ve described so far is that you want someone to be able to upload an XML file, and to store that XML data as a field in a database, to be able to be subsequently edited and saved back to the database.

There’s no data transformation involved there. That XML is a single field with a model.

You put XML into the database, you’ll get XML out of the database.

If you wish to parse and process that XML into a model with separate fields, etc, that’s a completely different set of requirements.