[xsd-users] Re: [xsde-users] how to insert/remove elements?

Boris Kolpackov boris at codesynthesis.com
Tue Feb 12 09:31:07 EST 2008


Hi Gennady,

[Removed xsde-users from CC list and added xsd-users.]

Gennady Khokhorin <gok at aerometric-ak.com> writes:

> I'm implementing an xml editor. Have xml template on input and need to
> add/edit/remove some elements and store the results.
> Is Tree generated code is appropriate to approach this task?

If you are implementing a generic XML editor that should be able to
edit any XML documents then something like DOM would probably be
more appropriate.

If, on the other hand, you are creating a special-purpose XML editor
to edit documents belonging to a predefined set of XML vocabularies
(for which you have schemas) then the C++/Tree mapping is a good
choice.

> Which xsd.exe options should be involved?

Since you will want to save the modified documents back to XML, you will
need to generate serialization code with the --generate-serialization
option.

For more information on how to parse, modify, and serialize XML documents
using the C++/Tree mapping see the C++/Tree Mapping Getting Started Guide:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/

Boris




More information about the xsd-users mailing list