[xsd-users] Arbitrary XML inside XML element

Boris Kolpackov boris at codesynthesis.com
Thu Aug 7 10:17:54 EDT 2008


Hi Attila,

Attila <atteeela at gmail.com> writes:

> Thanks for the information.  One more thing: Can I use the C++/Parser to do
> the same thing?

Yes, there is a similar facility in C++/Parser except there you receive
raw SAX callbacks (e.g., start_element(), end_element(), attribute(),
and characters()) for content matched by wildcards. The 'wildcard'
example in examples/cxx/parser/ shows how this works.


> I would like to be able to get the sub-XML text for specific nodes, but not
> receive callbacks for the "any'ed" elements that happen to show up.  Would
> there be anyway to perform a test to see if there are "any" elements
> underneath a specific element that you just received a callback for?

Yes, you can override the above-mentioned functions (see the 'wildcard'
example for details). There you can ignore/process/save content matched
by the wildcard in any way you want (including routing it to the another
parser).

Boris




More information about the xsd-users mailing list