Re: [xml] integers in xml document

Hi Antonio,

Antonio Meilán García <ameilan tredess com> writes:

Which functions of xmlSchema are supported? I mean, how can I set/get variables of a xml
document with type defined in the xsd file (integer,...). I have validated the xml with the
xsd, but I can not use functions for setting/getting variables individually.
which functions are appropriates?

You would normally need a data binding tool to be able to do this.
Generic XML parsers such as libxml2 represent information stored
in an XML document as a set of elements, attributes and text. The
advantage of this approach is that it can handle pretty much any
(valid) XML instance. The disadvantage lies in the fact that you
have to go through this raw XML representation and convert it to
your application data types (e.g., text to integers).

A data binding compiler will automatically generate data types
and conversion code for your vocabulary from XML Schema (or other
schema languages). This way you can access the data stored in XML
using types and functions that semantically correspond to your
application domain rather than dealing with elements, attributes
and text.


Boris Kolpackov
Code Synthesis Tools CC
Open-Source, Cross-Platform C++ XML Data Binding

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]