{"id":552,"date":"2019-05-15T08:44:14","date_gmt":"2019-05-15T00:44:14","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=552"},"modified":"2019-05-15T08:44:14","modified_gmt":"2019-05-15T00:44:14","slug":"bdl-fgl_base%e5%9f%ba%e6%9c%ac%e8%af%ad%e6%b3%95base-typeinfo","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=552","title":{"rendered":"BDL-FGL_BASE\u57fa\u672c\u8bed\u6cd5(base.TypeInfo)"},"content":{"rendered":"<pre class=\"pure-highlightjs\"><code class=\"null\">base.TypeInfo \u4ece\u7a0b\u5e8f\u503c\u521b\u5efaDOM\u6587\u6863\r\n\r\n \r\n\r\n\u65b9\u6cd5\uff1a\r\n\r\n\u7c7b\u65b9\u6cd5\r\n\r\ncreate(variable) RETURNING om.DomNode               \u8fd4\u56deDOM\u6587\u6863\r\n\r\n \r\n\r\n\u4f7f\u7528\u6b65\u9aa4\uff1a\r\n\r\n\u4e0d\u9700\u8981\u5148\u521b\u5efa\u5bf9\u8c61\uff0c\u76f4\u63a5\u8c03\u7528\u8be5\u7c7b\u7684\u65b9\u6cd5\r\n\r\n \r\n\r\n\u793a\u4f8b\uff1a\r\n\r\nview plaincopy to clipboardprint?\r\n#base.TypeInfo.4gl    \r\nMAIN     \r\n   DEFINE nod   om.DomNode     \r\n   DEFINE XML    RECORD     \r\n                  KEY   INTEGER,     \r\n                  NAME  CHAR(20),     \r\n                  VALUE DATE     \r\n                 END RECORD     \r\n    LET xml.KEY = 'lee'     \r\n    LET xml.NAME= 'yihui'     \r\n    LET xml.VALUE=MDY(2,13,1986)     \r\n    LET nod = base.TypeInfo.create(xml)       #RECORD\u53d8\u91cf\u751f\u6210XML    \r\n    CALL nod.writeXml(\"..\/4gl\/employee.xml\")      \r\n      \r\n    LET nod = base.TypeInfo.create(xml.key)   #\u5355\u53d8\u91cf\u751f\u6210XML    \r\n    CALL nod.writeXml(\"..\/4gl\/key.xml\")   \r\nEND MAIN  \r\n#base.TypeInfo.4gl \r\nMAIN   \r\n   DEFINE nod   om.DomNode   \r\n   DEFINE XML    RECORD   \r\n                  KEY   INTEGER,   \r\n                  NAME  CHAR(20),   \r\n                  VALUE DATE   \r\n                 END RECORD   \r\n    LET xml.KEY = 'lee'   \r\n    LET xml.NAME= 'yihui'   \r\n    LET xml.VALUE=MDY(2,13,1986)   \r\n    LET nod = base.TypeInfo.create(xml)       #RECORD\u53d8\u91cf\u751f\u6210XML \r\n    CALL nod.writeXml(\"..\/4gl\/employee.xml\")    \r\n    \r\n    LET nod = base.TypeInfo.create(xml.key)   #\u5355\u53d8\u91cf\u751f\u6210XML \r\n    CALL nod.writeXml(\"..\/4gl\/key.xml\") \r\nEND MAIN\r\n\r\n\r\n\u8fd0\u884c\uff1a&lt;topprod:\/u1\/usr\/lee\/4gl\/42m&gt; fglrun 4gl_base.TypeInfo.42m\r\n\r\n\u7ed3\u679c\uff1a\u53ef\u4ee5\u5728..\/4gl\u76ee\u5f55\u4e0b\u9762\u5df2\u7ecf\u751f\u6210\u4e86xml\u6587\u4ef6employee.xml\u3001key.xml\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a\r\n\r\n&lt;?xml version='1.0' encoding='UTF-8'?&gt;   \r\n&lt;Record&gt;                                      &lt;!--RECORD\u53d8\u91cf\u751f\u6210XML --&gt; \r\n  &lt;Field type=\"INTEGER\" value=\"0\" name=\"KEY\"\/&gt;&lt;!--\u6ce8\u610fKEY\u4e3aINTEGER,\u8d4b\u503c\u4e3a\u5b57\u7b26\u6240\u4ee5\u9ed8\u8ba4\u4e3a\u4e860--&gt; \r\n  &lt;Field type=\"CHAR(20)\" value=\"yihui\" name=\"NAME\"\/&gt;   \r\n  &lt;Field type=\"DATE\" value=\"86\/02\/13\" name=\"VALUE\"\/&gt;   \r\n&lt;\/Record&gt; \r\n \r\n\r\n&lt;?xml version='1.0' encoding='UTF-8'?&gt;    &lt;!--\u5355\u53d8\u91cf\u751f\u6210XML    --&gt; \r\n&lt;Field type=\"INTEGER\" value=\"0\" \/&gt;        &lt;!--\u6ce8\u610fKEY\u4e3aINTEGER\uff0c\u8d4b\u503c\u4e3a\u5b57\u7b26\u6240\u4ee5\u9ed8\u8ba4\u4e3a\u4e860 --&gt;\r\n \r\n\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=552\">BDL-FGL_BASE\u57fa\u672c\u8bed\u6cd5(base.TypeInfo)<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>base.TypeInfo \u4ece\u7a0b\u5e8f\u503c\u521b\u5efaDOM\u6587\u6863 \u65b9\u6cd5\uff1a \u7c7b\u65b9\u6cd5 create(variable) RETURNING om.DomNode \u8fd4\u56deDOM\u6587\u6863 \u4f7f\u7528\u6b65\u9aa4\uff1a \u4e0d\u9700\u8981\u5148\u521b\u5efa\u5bf9\u8c61\uff0c\u76f4\u63a5\u8c03\u7528\u8be5\u7c7b\u7684\u65b9\u6cd5 \u793a\u4f8b\uff1a view plaincopy t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[172,177,176],"class_list":["post-552","post","type-post","status-publish","format-standard","hentry","category-4gl","tag-base","tag-let","tag-xml"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=552"}],"version-history":[{"count":1,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/552\/revisions"}],"predecessor-version":[{"id":553,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/552\/revisions\/553"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}