M
M
MichaelN2013-07-27 18:37:34
Python
MichaelN, 2013-07-27 18:37:34

is it possible to add to xml file

there is an xml file with nodes

<root>
<minute0>
<minute1>
<minute2>


is it possible to add data to the end
create a new subnode
<minute3>


and so on

if you know then show a small example or tell me where to read

thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
moonsly, 2013-07-27
@MichaelN

stackoverflow.com/questions/4788633/insert-a-node-for-an-element-in-xml-with-python-elementtree

K
Krypt, 2013-07-27
@Krypt

With a probability of 98% it is impossible.
First, the RFC requires an XML document to have a single root node, but not all parsers follow the standard. The standard Windows MSXML used in .NET follows.
Second, it depends on the XML parsing method used, even if the parsing library allows multiple root nodes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question