I do serialization. Everything turns out. But there is a need to check some fields for uniqueness and filling (not empty). Can this be done in xml (for example in the schema)? Or should I check this for objects prior to serialization using conditions? Suitable articles or books are welcome.

  • You check the validity of your models before saving to the database, why not do the same before saving to the file? - tym32167
  • about books: XML Basic course . A brick of 1.5k pages, but there is everything you need with a good explanation, including some old techniques like DTD, which still have practical benefits in some cases. - rdorn
  • What do you mean by the уникальностью полей ? - rdorn
  • I mean as in the database (if there is already in the field with the same value, then the exception crashes or an error). You can check it before saving, but it seems you can somehow look more beautiful - Vitaly Shebanits
  • one
    The lack of validation of your models or DTO in the code will not look more beautiful, it will be a hole in your security. - tym32167

0