amorlzu / pugixml

Automatically exported from code.google.com/p/pugixml
0 stars 0 forks source link

partial node saving #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What feature do you require in pugixml?
 Separate function to save tag, its children and closing tag.

What do you need this feature for?
 I am saving a long xml document on the fly while creating single elements. I cannot use pugixml api to write root element, because whole document in memory is needed to save a root tag. Now I have to use separate (own) function only to write root tag and its attributes.

Original issue reported on code.google.com by romgo...@gmail.com on 22 Jun 2012 at 8:01

GoogleCodeExporter commented 9 years ago
Should be easy to do once we agree on semantics...

Given a node <foo><bar/></foo>, what should the result of saving foo be? (pick 
from either <foo><bar/> or <foo>)
Given a node <foo/>, what should the result of saving foo be? (pick from either 
<foo> or <foo/>).

Original comment by arseny.k...@gmail.com on 3 Jul 2012 at 3:11

GoogleCodeExporter commented 9 years ago
I think that, for both your samples it should write the same:
open tag: <foo> , close tag: </foo>

To complete the API there also could be a possibility to write only children 
nodes, but not necessarily, as it can be easily done with current api.

There can be a new function, or only flags for current print function.

Original comment by romgo...@gmail.com on 5 Jul 2012 at 1:52

GoogleCodeExporter commented 9 years ago
Since there is no demand for this I'm closing this with wontfix for now.

Original comment by arseny.k...@gmail.com on 26 Oct 2014 at 9:11