M
michelle
I'm a seasoned C++ programmer, but I'm new to xml. I'm working on a
multimedia application. For getting my feet wet, I've decided to create a
toy application that can play and display a very basic midi file. I've come
up with an xml file format that the application should use.
For the player portion, I simply want to translate my file format to a
standard midi file (which is a binary format) and call a midi player. My
usual method would be to write a small utility that parses the xml file and
outputs the binary file. By using xml, do I have the opportunity to save
some programming effort? Can I use an xst to do a translation? Does it make
sense to try and make use of an existing xml parser? I'm still trying to
figure out if the xml tools are valuable for this project or if my file
format being xml is simply a convenient way for me to organize the file
data.
The validation portion of the xerces parser seems to be useful. But using a
DTD only provides very limited help. What would be very helpful would be to
be able to create new tokens used for constraining data. For example, I
would like to be able to have integer values in the range 0..127 and hex
values like 0x2f3d. Using a DTD, the best I seem to be able to do is
constrain the first to NMTOKEN and the second to PCDATA. Do DTD's allow me
to do this? Or do I have to use a schema? If so which schema, and where can
I find some more info?
Does xml change the way I should be thinking about the data structures in
my application? I seem to be deriving a very close relationship between C++
classes in the application and xml elements.
Any help is appreciated.
multimedia application. For getting my feet wet, I've decided to create a
toy application that can play and display a very basic midi file. I've come
up with an xml file format that the application should use.
For the player portion, I simply want to translate my file format to a
standard midi file (which is a binary format) and call a midi player. My
usual method would be to write a small utility that parses the xml file and
outputs the binary file. By using xml, do I have the opportunity to save
some programming effort? Can I use an xst to do a translation? Does it make
sense to try and make use of an existing xml parser? I'm still trying to
figure out if the xml tools are valuable for this project or if my file
format being xml is simply a convenient way for me to organize the file
data.
The validation portion of the xerces parser seems to be useful. But using a
DTD only provides very limited help. What would be very helpful would be to
be able to create new tokens used for constraining data. For example, I
would like to be able to have integer values in the range 0..127 and hex
values like 0x2f3d. Using a DTD, the best I seem to be able to do is
constrain the first to NMTOKEN and the second to PCDATA. Do DTD's allow me
to do this? Or do I have to use a schema? If so which schema, and where can
I find some more info?
Does xml change the way I should be thinking about the data structures in
my application? I seem to be deriving a very close relationship between C++
classes in the application and xml elements.
Any help is appreciated.