среда, 29 апреля 2015 г.

Convert XSD to sql with Altova XmlSpy 2011

Sometimes you got a task to parse xml and load it into database. The xml conforms to xml schema.
You have to create the sql for the xsd. How to do it?
XmlSpy has the ability to convert xsd into sql. Well, it claims to support DB2.

So, the surprise was that XmlSpy uses ODBC driver. That's a big surprise. Ok.
After after some processing XmlSpy figured out the sql, but... all attributes were VARGRAPHIC.
XmlSpy allows you  to change the sql types, but it is a lot of work.

That is very strange behavior, because in XSD was already signed the standard XML schema types.
At least, I've got a start sql to work with...

Комментариев нет:

Отправить комментарий