{"id":283350,"date":"2017-01-02T11:25:04","date_gmt":"2017-01-02T08:25:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283350"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283350","title":{"rendered":"Simple XML Framework \u2014 \u043f\u0438\u0448\u0435\u043c API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438 DIA"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/hsto.org\/storage\/633466c5\/dc599ee2\/d3e6d4d3\/c88da95e.png\" alt=\"Simple Xml Framework\" height=\"70\"\/> <img decoding=\"async\" src=\"http:\/\/static.dia-installer.de\/images\/dia.png\" alt=\"Dia Diagram Editor\"\/> &nbsp; <b>Dia Diagram Editor<\/b><\/p>\n<p>  \u0424\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a <a href=\"http:\/\/simple.sourceforge.net\/\">Simple XML<\/a> \u2014 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043c\u043d\u043e\u0433\u0438\u043c, \u043f\u0440\u0438 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435, \u043e\u043d \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043f\u043e\u0442\u044f\u0433\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u00ab\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u043d\u044b\u043c\u00bb JAXB, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0410\u043d\u0434\u0440\u043e\u0438\u0434. <\/p>\n<p>  \u0421\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435 \u00ab\u043d\u0430\u0432\u0430\u043b\u043e\u043c\u00bb, \u043d\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0424\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a <a href=\"https:\/\/habrahabr.ru\/post\/116830\/\">\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u0435\u0441\u0442\u044c <a href=\"http:\/\/www.ibm.com\/developerworks\/library\/x-simplexobjs\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 ibm developerworks<\/a>, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 <a href=\"http:\/\/simple.sourceforge.net\/download\/stream\/doc\/examples\/examples.php\">\u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/a> <br \/>  \u0438 <a href=\"http:\/\/simple.sourceforge.net\/download\/stream\/doc\/tutorial\/tutorial.php\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a>.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c \u0438 \u0446\u0435\u043b\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u044f\u0441\u043d\u043e. \u041d\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u0430\u0445 \u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 XML \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a DIA \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u0442\u044c Simple Framework \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e\u00bb \u0434\u043b\u044f Simple Framework; \u043c\u044b \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 TreeStrategy \u0438 \u043e\u043f\u0438\u0448\u0435\u043c \u00ab\u0445\u0438\u0442\u0440\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443\u00bb \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b xml-\u0444\u0430\u0439\u043b\u0430 DIA \u043a Java \u043a\u043b\u0430\u0441\u0441\u0430\u043c.<\/p>\n<p>  \u0418 \u0434\u0430, \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Simple XML Framework.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043f\u0440\u043e DIA \u0438 \u043d\u0430\u0447\u0430\u043b\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h2>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c DIA \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u043c. \u0412 \u0441\u0432\u043e\u0435\u043c \u0440\u043e\u0434\u0435, \u044d\u0442\u043e \u00ab\u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430 \u0436\u0430\u043d\u0440\u0430\u00bb.<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u043d \u043e\u043d \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e, \u043d\u043e \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0432\u043d\u044f\u0442\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0444\u0430\u0439\u043b\u0430 \u043d\u0435\u0442. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u0444\u0430\u0439\u043b .dia \u2014 \u044d\u0442\u043e zip-\u0430\u0440\u0445\u0438\u0432 xml-\u0444\u0430\u0439\u043b\u0430 \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .dia (\u0438 \u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0441\u0436\u0430\u0442\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438). \u0410 \u0434\u0430\u043b\u044c\u0448\u0435\u2026 \u0434\u0430\u043b\u044c\u0448\u0435, \u043c\u043e\u043b, \u00ab\u0440\u0430\u0437\u0431\u0435\u0440\u0451\u0442\u0435\u0441\u044c \u0441\u0430\u043c\u0438, \u0442\u0430\u043c \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u00bb. <\/p>\n<p>  \u0412 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0439 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0435 \u043f\u0430\u0440\u0443 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0435\u043a\u0438\u0435 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f, \u043d\u043e \u043d\u044b\u043d\u0435 \u043e\u043d\u0438 \u043c\u0435\u0440\u0442\u0432\u044b. <\/p>\n<p>  \u041f\u0440\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c, \u0440\u0435\u0447\u0438 \u0442\u043e\u0436\u0435 \u043d\u0435\u0442. \u0415\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 Dia, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. <\/p>\n<p>  \u00ab\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u2014 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e\u00bb, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f, \u00ab\u043d\u043e \u043c\u043d\u0435 \u043d\u0443\u0436\u0435\u043d API. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 Java\u00bb. <\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u044f \u0440\u0435\u0448\u0438\u043b\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <i>\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434<\/i>. \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u043d\u0435, \u0444\u043e\u0440\u043c\u043e\u0439 \u043f\u043e\u0434 \u043c\u043e\u0451 \u0441\u0435\u0434\u0430\u043b\u0438\u0449\u0435, <br \/>  \u0441 \u0440\u0443\u043b\u0435\u043c \u043f\u043e\u0434 \u0444\u043e\u0440\u043c\u0443 \u043c\u043e\u0438\u0445 \u0440\u0443\u043a, \u0441 \u043a\u043e\u043b\u0435\u0441\u0430\u043c\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0435 \u0432\u044b\u0431\u043e\u0438\u043d \u0442\u0440\u043e\u043f\u0438\u043d\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0445\u043e\u0436\u0443 \u044f. <\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432 Dia \u0438 \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u0441\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u00ab\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u00bb.<\/p>\n<p>  \u0412 .dia, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0430: \u044d\u0442\u043e \u0442\u0435\u0433 object, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u00ab\u043e\u0431\u0440\u0430\u043c\u043b\u044f\u0435\u0442\u00bb \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0442\u0435\u0433\u043e\u0432 attribute, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0442\u0430\u043a \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &#39;\u043b\u0438\u043d\u0438\u044f&#39; \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043f\u0430\u043b\u0438\u0442\u0440\u044b DIA<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">    &lt;dia:object type=&quot;Standard - Line&quot; version=&quot;0&quot; id=&quot;O10&quot;&gt;       &lt;dia:attribute name=&quot;obj_pos&quot;&gt;         &lt;dia:point val=&quot;2.99224,32.237&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;obj_bb&quot;&gt;         &lt;dia:rectangle val=&quot;2.92606,32.1708;7.37558,34.382&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;conn_endpoints&quot;&gt;         &lt;dia:point val=&quot;2.99224,32.237&quot;\/&gt;         &lt;dia:point val=&quot;7.3094,34.1931&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;numcp&quot;&gt;         &lt;dia:int val=&quot;1&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;end_arrow&quot;&gt;         &lt;dia:enum val=&quot;5&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;end_arrow_length&quot;&gt;         &lt;dia:real val=&quot;0.5&quot;\/&gt;       &lt;\/dia:attribute&gt;       &lt;dia:attribute name=&quot;end_arrow_width&quot;&gt;         &lt;dia:real val=&quot;0.5&quot;\/&gt;       &lt;\/dia:attribute&gt;     &lt;\/dia:object&gt; <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0442\u0443\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0438\u043f\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0442\u0435\u0433\u043e\u043c. <br \/>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c Simple Framework, \u0447\u0442\u043e:<\/p>\n<pre><code class=\"xml\">&lt;dia:object type=&quot;Standard - Line&quot; version=&quot;0&quot; id=&quot;O10&quot;&gt;<\/code><\/pre>\n<p>  \u041d\u0430\u0434\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 Line, \u0430:<\/p>\n<pre><code class=\"xml\">&lt;dia:object type=&quot;Standard - Box&quot; version=&quot;0&quot; id=&quot;O0&quot;&gt;<\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 Box. \u0412 \u0448\u0442\u0430\u0442\u043d\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f Simple Framework \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u00bb DiaTreeStrategy, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a \u0441\u043b\u043e\u0432\u0443, \u0440\u0430\u0437 \u0443\u0436 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0437\u043c Simple Framework \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 .dia, \u0441\u0442\u043e\u0438\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @Xpath \u0438 \u0435\u0451 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f.<\/b><\/p>\n<div class=\"spoiler_text\">\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Dia \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 xml \u2014 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u0435\u043d \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u044b \u043c\u0435\u043d\u044f\u043b\u0438 \u0443 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. <\/p>\n<p>  \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 xml, \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e @Xpath \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0432 xml \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0415\u0441\u043b\u0438 \u0431\u044b \u0432 @Xpath \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 xpath-\u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u2014 \u0442\u043e \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u0431\u044b \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u0440\u043e\u0449\u0435, \u043d\u043e \u0443\u0432\u044b \u2014 \u0432 @Xpath \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0442\u044c \u0438 \u0438\u043d\u0434\u0435\u043a\u0441. \u042d\u0442\u0438 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u0443 \u043c\u0435\u043d\u044f \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437. <\/p><\/div>\n<\/div>\n<p>  <\/p>\n<h2>\u00abC\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u00bb \u0432 Simple Framework, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c DiaTreeStrategy<\/h2>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e\u00bb (\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Strategy) \u0432 Simple Framework \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 XML \u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0432 Java. <\/p>\n<p>  \u0423 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0441\u0435\u0433\u043e 2 \u043c\u0435\u0442\u043e\u0434\u0430 \u2014 read() \u0438 write(). \u041f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u043c\u0443 xml-\u0443\u0437\u043b\u0443 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 xml-\u0443\u0437\u0435\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e \u0441 \u043d\u0443\u043b\u044f \u2014 \u00ab\u0434\u0435\u043b\u043e \u043d\u0435 \u0431\u0430\u0440\u0441\u043a\u043e\u0435\u00bb, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 TreeStrategy \u0432\u043e \u0432\u0441\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c (\u043a\u0440\u043e\u043c\u0435 \u043d\u0435\u0437\u043d\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0443\u0437\u043b\u044b \u0442\u0438\u043f\u0430 object) \u2014 \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041f\u043e\u0442\u043e\u043c\u0443 \u043c\u044b \u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043c. \u041e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u0438 \u043f\u043e\u0434\u043f\u0440\u0430\u0432\u0438\u043c.<\/p>\n<pre><code class=\"java\">public class DiaTreeStrategy extends TreeStrategy<\/code><\/pre>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0441\u044f, \u0447\u0442\u043e \u00ab\u0432\u0441\u0451\u00bb, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u2014 \u044d\u0442\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e\u00bb \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e type \u0443 \u0442\u0435\u0433\u0430 object, \u0438 \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0442\u043e \u00abUML \u2014 Class\u00bb \u2014 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043b\u0430\u0441\u0441\u0443 diaXML.shapes.uml.UmlClass, \u0430 \u00abStandard \u2014 Box\u00bb \u2014 \u043a\u043b\u0430\u0441\u0441\u0443 diaXML.shapes.standart.StdBox.<\/p>\n<p>  \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0435 (type + version =&gt; \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430) \u044f \u0440\u0435\u0448\u0438\u043b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c ArrayList:<\/p>\n<pre><code class=\"java\">ArrayList&lt;DiaObjToClassMapRecord&gt; diaObj2ClassMap;<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u043f\u0440\u044f\u043c\u043e \u043f\u043e\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public ArrayList&lt;DiaObjToClassMapRecord&gt; diaObj2ClassMap = new ArrayList&lt;DiaObjToClassMapRecord&gt;();   {\t\/\/default base mapping \t\t     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;UML - Class&quot;,\t\t\t&quot;0&quot;,\t&quot;diaXML.shapes.uml.UmlClass&quot; ));     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;UML - Association&quot;,\t\t&quot;2&quot;,\t&quot;diaXML.shapes.uml.UmlAssociation&quot; )); \t\t     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;Standard - Box&quot;,\t\t&quot;0&quot;,\t&quot;diaXML.shapes.standart.StdBox&quot; ));     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;Standard - Text&quot;,\t\t&quot;1&quot;,\t&quot;diaXML.shapes.standart.StdText&quot; ));     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;Standard - ZigZagLine&quot;,\t&quot;1&quot;,\t&quot;diaXML.shapes.standart.StdZigZagLine&quot; )); \t\t     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;Standard - BezierLine&quot;,\t&quot;*&quot;,\t&quot;diaXML.shapes.standart.StdBezierLine&quot; )); \t\t     \/\/universal     diaObj2ClassMap.add(new DiaObjToClassMapRecord(&quot;*&quot;,\t&quot;*&quot;,\t&quot;diaXML.shapes.UncknownShapeObject&quot; )); \t\t    }<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u0442 \u0441\u0432\u043e\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 DiaTreeStrategy. \u041f\u043e\u043a\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u043e 5 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (POJO) \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043c\u0435\u044e\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u2014 UncknownShapeObject \u2014 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432\u0441\u0451 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043d\u0430\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b; \u043e\u043d \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442, \u0438 \u0445\u0440\u0430\u043d\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0432 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u044d\u0442\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044f \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">   private Class readValueAdv(Type type, NodeMap node) throws Exception     {       \t  \/\/ we need here catch only &lt;object&gt; tag \t  if( !&quot;object&quot;.equals(node.getName()) )  \t\t\t  return null; \t         Node entry_type = node.get(&quot;type&quot;);       Node entry_version = node.get(&quot;version&quot;);       if( entry_type == null || entry_version==null)  \t      {  return null; \t      };              String name_type = entry_type.getValue();       String name_version = entry_version.getValue();       String className=null;       Class expect=null;              for (DiaObjToClassMapRecord crec: diaObj2ClassMap) \t      { \t\t      if (\t  ( \tcrec.diaType!=null && (crec.diaType.equals(name_type) ||  !crec.diaType.isEmpty() && crec.diaType.equals(&quot;*&quot;) ) \t\t    \t\t  ) \t\t    \t  &&  \t\t    \t\t  ( \tcrec.diaVersion!=null && ( crec.diaVersion.equals(name_version) ||  !crec.diaVersion.isEmpty() && crec.diaVersion.equals(&quot;*&quot;)  )  \t\t    \t\t  ) \t\t    \t ) \t\t      {\t\tclassName = crec.javaClassName; \t\t      \t\tbreak; \t\t\t  } \t\t  }              if (className !=null)      \t  { expect = loader.load(className);     \t  \tNode entry = node.remove(label);     \t  }              return expect;    }      <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u2014 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 read. <\/p>\n<pre><code class=\"java\">public class DiaTreeStrategy extends TreeStrategy ...    @Override    public Value read(Type type, NodeMap node, Map map) throws Exception     {       Class actualDeclaredByDia = readValueAdv(type, node);       if (actualDeclaredByDia==null)      \t  return super.read(type, node, map);       return new ObjectValue(actualDeclaredByDia);    }<\/code><\/pre>\n<p>  \u042d\u0442\u043e, \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451. \u0412\u0435\u0440\u043d\u0435\u0435, \u044d\u0442\u043e \u0431\u044b\u043b \u00ab\u043a\u0440\u0430\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043c\u0435\u043d\u044c \u043f\u0440\u0435\u0442\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Simple Framework \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 DIA.<\/p>\n<p>  \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432 Simple XML \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438-\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0447\u0438\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 XML, \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0442\u0434. \u0438 \u0442\u043f., \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440.<\/p>\n<h2>\u0420\u0430\u0434\u0438 \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u0438 \u043a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/h2>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u00abDiaXML API\u00bb. \u0411\u0435\u0437 DiaTreeStrategy \u043e\u043d\u043e \u0431\u044b \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0418 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0435\u0440\u0435\u0434 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 diaXmlApi.jar (\u0431\u0440\u0430\u0442\u044c <a href=\"https:\/\/v2.pikacode.com\/tachikoma\/diaxml_api\/src\/4608c1ef4696ed8d9990b54a8e3f419c184b2d31\/DiaXML_API\/jar\/diaXmlApi.jar\">\u0442\u0443\u0442<\/a>). <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c .dia<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import java.io.File;  import org.simpleframework.xml.strategy.DiaTreeStrategy;  import diaXML.Diagram; import diaXML.shapes.standart.StdText;  public void main(String[] args) \t{ \t\tStrategy strategy = new DiaTreeStrategy();  \t\tSerializer serializer = new Persister(strategy);  \t\tFile source = new File(&quot;path\/to\/dia\/file\/to\/read.dia&quot;);  \t\tDiagram probeDia=null;\t\t \t\ttry {\tprobeDia = serializer.read(Diagram.class, source); \t\t\t} catch (Exception e) {\te.printStackTrace(); return ;} \t\t \t\tSystem.out.println(&quot; File readed. Here is list of objects at layer 0 :&quot;); \t\t \t\tfor (IDiaObject cObj: probeDia.layers.get(0).objects ) \t\t\t{\tSystem.out.println(&quot; dia type [&quot;+cObj.getObjectType()+&quot;]ver.[&quot;+cObj.getObjectTypeVersion()+&quot;] objId:[&quot;+cObj.getId()+&quot;] name:[&quot;+cObj.getName()+&quot;]&quot;);\t \t\t\t\t \t\t\t\tif ( StdText.TYPENAME.equals(cObj.getObjectType())  ) \t\t\t\t\t{ System.out.println(&quot; text value is:[&quot;+((StdText)cObj).textValue+&quot;]&quot;);\t \t\t\t\t\t}; \t\t\t} \t}<\/code><\/pre>\n<\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c .dia<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">import java.io.File;  import org.simpleframework.xml.strategy.DiaTreeStrategy;  import diaXML.Diagram; import diaXML.shapes.standart.StdText;  public void main(String[] args) \t{ \t\tStrategy strategy = new DiaTreeStrategy();  \t\tSerializer serializer = new Persister(strategy);  \t\t \t\tStdText cText= new StdText(); \t\tcText.textValue=&quot;this is a demo \\n of creating DIA-file&quot;; \t\tcText.obj_pos.moveTo(15, 5);  \t\tDiagram probeDia=new Diagram().initWithDefaults(); \t\tprobeDia.layers.get(0).objects.add(cText); \t\t \t\tFile resultFile = new File(&quot;path\/to\/dia\/file\/to\/write.dia&quot;); \t\t \t\ttry {\tserializer.write(probeDia, resultFile); \t\t\t} catch (Exception e) {\te.printStackTrace(); } \t\t\t \t}<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0415\u0449\u0451 \u043f\u0430\u0440\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (<a href=\"https:\/\/v2.pikacode.com\/tachikoma\/diaxml_api\/src\/4608c1ef4696ed8d9990b54a8e3f419c184b2d31\/DiaXML_API\/src\/jse_diaxmlapi_examples\">\u0442\u0443\u0442<\/a>).<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f\u00bb \u0432 Simple XML Framework \u0438 \u043a\u0430\u043a \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0443\u0436\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438 \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u0445 Simple Framework (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u0432 @Xpath-\u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0432 @Xpath-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445). <\/p>\n<p>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u00abDiaXML API\u00bb \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c\u0438 \u0441\u0438\u043b\u0430\u043c\u0438. \u041f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h2>C\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li> <a href=\"https:\/\/v2.pikacode.com\/tachikoma\/diaxml_api\">DiaXML API project<\/a><\/li>\n<li> <a href=\"http:\/\/simple.sourceforge.net\/\">Simple XML Framework project<\/a><\/li>\n<li> <a href=\"http:\/\/dia-installer.de\/\">Dia Diagram Editor<\/a> <\/li>\n<\/ul>\n<p>  <b>PS:<\/b> \u0421 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u043e\u0433\u043e API, \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0443\u0442\u0438\u043b\u0438\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432 DIA \u0441\u0445\u0435\u043c\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e). \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0411\u0414 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Turbine XML, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <a href=\"http:\/\/db.apache.org\/ddlutils\/\">Apache DDL Utils<\/a>.<br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/318898\/\"> https:\/\/habrahabr.ru\/post\/318898\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/hsto.org\/storage\/633466c5\/dc599ee2\/d3e6d4d3\/c88da95e.png\" alt=\"Simple Xml Framework\" height=\"70\"\/> <img decoding=\"async\" src=\"http:\/\/static.dia-installer.de\/images\/dia.png\" alt=\"Dia Diagram Editor\"\/> &nbsp; <b>Dia Diagram Editor<\/b><\/p>\n<p>  \u0424\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a <a href=\"http:\/\/simple.sourceforge.net\/\">Simple XML<\/a> \u2014 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043c\u043d\u043e\u0433\u0438\u043c, \u043f\u0440\u0438 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435, \u043e\u043d \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043f\u043e\u0442\u044f\u0433\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u00ab\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437\u043d\u044b\u043c\u00bb JAXB, \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u0410\u043d\u0434\u0440\u043e\u0438\u0434. <\/p>\n<p>  \u0421\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043d\u0435 \u00ab\u043d\u0430\u0432\u0430\u043b\u043e\u043c\u00bb, \u043d\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442. \u0424\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a <a href=\"https:\/\/habrahabr.ru\/post\/116830\/\">\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0441\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u0435\u0441\u0442\u044c <a href=\"http:\/\/www.ibm.com\/developerworks\/library\/x-simplexobjs\/\">\u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 ibm developerworks<\/a>, \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 <a href=\"http:\/\/simple.sourceforge.net\/download\/stream\/doc\/examples\/examples.php\">\u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/a> <br \/>  \u0438 <a href=\"http:\/\/simple.sourceforge.net\/download\/stream\/doc\/tutorial\/tutorial.php\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e<\/a>.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c \u0438 \u0446\u0435\u043b\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u044f\u0441\u043d\u043e. \u041d\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432 \u043c\u0430\u043d\u0443\u0430\u043b\u0430\u0445 \u0438 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430\u0445. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 XML \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a DIA \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0443\u0447\u0438\u0442\u044c Simple Framework \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u00ab\u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044e\u00bb \u0434\u043b\u044f Simple Framework; \u043c\u044b \u043e\u0442\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 TreeStrategy \u0438 \u043e\u043f\u0438\u0448\u0435\u043c \u00ab\u0445\u0438\u0442\u0440\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443\u00bb \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043d\u0430\u0434\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b xml-\u0444\u0430\u0439\u043b\u0430 DIA \u043a Java \u043a\u043b\u0430\u0441\u0441\u0430\u043c.<\/p>\n<p>  \u0418 \u0434\u0430, \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Simple XML Framework.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-283350","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=283350"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283350\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}