AW: [xsd-users] newly added node not in list?

Oliver.Kowalke at infineon.com Oliver.Kowalke at infineon.com
Tue Apr 11 06:09:53 EDT 2006



>> Question: How to build up xml document which contains nodes of type
>> xsd:any?
>
>The answer really depends on what you are going to do with such a
>document. Are you going to serialize it? Are you going to pass it
>to other parts of your program that are going to extract the xsd:any
>info using DOM API?
>
>If you are going to serialize it then you will need to (1) serialize
>statically-typed tree to a DOM document, (2) insert content
corresponding
>to xsd:any into the DOM document, and (3) serialize DOM document to
>XML. In this case there is no point in trying to build statically-typed
>tree with nodes that correspond to xsd:any since they are not going
>to be picked up by the serialization process.
>
>On the other hand, if you need to build a statically-typed tree as if
>it was just read from a file, then I will need to add a _node
(DOMNode*)
>function to assign DOM nodes to newly created tree nodes. Let me know
>if this is the case.

I provide the users a library which should contain a statically-typed
tree representing an xml document structure. The users shouldn't deal
with the xerces stuff. They should only be able to parse an xml file,
create the tree structure and using it in their applications (serialize
and modify). It should also be possible to create a statically typed
tree in memory (constructing from statically typed nodes of the tree)
and serialize it (to a file for instance).
I would add some special functions (templated) which allow access to the
content of an xsd:any node (already working -> c_type). Adding such a
node to the statically typed tree (no matter if it was parsed from a
file or created from classes of the tree) is the problem I want to
solve.
If I understand your last notice your solution would solve the problem
(I hope).

Regards,
Oliver




More information about the xsd-users mailing list