JAXB добавление ненужных объявлений пространства имен к тегам

Для обнаружения измененных файлов Вы могли попробовать fam (монитор изменения файла) или inotify. Последний является определенным для Linux, fam имеет bsd порт, который мог бы работать над OS X. У обоих есть инструменты пространства пользователя, которые могли использоваться в сценарии вместе с rsync.

11
задан mdb 4 November 2009 в 20:33
поделиться

1 ответ

The functionality you are looking for was requested as an enhancement on the JAXB issue tracker in issue 103. The enhancement was declined, since the JAXB authors find it too expensive to traverse the object tree once more before the actual serialization starts to determine which namespaces are actually required.

Although rather bloated, the unnecessary namespaces are not invalidating the XML document. If you really have to save the few bytes and the extra computation cost is affordable, it should be quite easy to write your own XML processor/filter, which takes the JAXB output, parses the document and writes a new document without the unused namespace definitions.

10
ответ дан 3 December 2019 в 10:04
поделиться
Другие вопросы по тегам:

Похожие вопросы: