{"id":10747,"date":"2015-05-18T10:42:28","date_gmt":"2015-05-18T15:42:28","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=10747"},"modified":"2015-05-18T10:42:28","modified_gmt":"2015-05-18T15:42:28","slug":"sun-idm-xml-object-language","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=10747","title":{"rendered":"Sun IDM: XML Object Language"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Intro\">Intro<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Compared_to_XPRESS\">Compared to XPRESS<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Using_XML_Objects_in_XPRESS\">Using XML Objects in XPRESS<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Example_1_using_both_types_of_syntax\">Example 1, using both types of syntax<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Example_2:_Using_XML_Object_Syntax_to_Map_Objects\">Example 2: Using XML Object Syntax to Map Objects<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Intro\"><h2>Intro<\/h2><\/span>\n<p>* Often used in forms<br \/>\n&#8211; especially a list of allowed values for <em>Select <\/em>or <em>MultiSelect <\/em>fields<br \/>\n* Can also be used in workflows and rules<br \/>\n* For example:<\/p>\n<pre lang=\"xml\">\r\n<Field name='global.state'>\r\n    <Display class='Select'>\r\n       <Property name='title' value='State'\/>\r\n       <Property name='allowedValues'>\r\n         <List>\r\n            <String>Alabama<\/String>\r\n            <String>Alaska<\/String>\r\n            <String>Arizona<\/String>\r\n            <String>Arkansas<\/String>\r\n            <String>California<\/String>\r\n            <String>Washington<\/String>\r\n            <String>Washington D.C.<\/String>\r\n            <String>West Virginia<\/String>\r\n            <String>Wisconsin<\/String>\r\n            <String>Wyoming<\/String>\r\n         <\/List>\r\n       <\/Property>\r\n    <\/Display>\r\n<\/Field>\r\n<\/pre>\n<span id=\"Compared_to_XPRESS\"><h2>Compared to XPRESS<\/h2><\/span>\n<p>* Static, not evaluated, hence more efficient<\/p>\n<pre lang=\"xml\">\r\n<String>cat<\/String> \r\nvs: \r\n<s>cat<\/s>\r\n<\/pre>\n<pre lang=\"xml\">\r\n<Integer>10<\/Integer> \r\nvs: \r\n<i>10<\/i>\r\n<\/pre>\n<pre lang=\"xml\">\r\n <Boolean>true<\/Boolean>\r\n <Boolean>false<\/Boolean \r\nvs:\r\n <i>1<\/i>\r\n <i>0<\/i>\r\n<\/pre>\n<pre lang=\"xml\">\r\n<null\/> \r\nvs: \r\n<null\/>\r\n<\/pre>\n<pre lang=\"xml\">\r\n<Map>\r\n<MapEntry key='name' value='neko'\/>\r\n<MapEntry key='ID' value='123'\/>\r\n<\/Map> \r\nvs:\r\n<map>\r\n<s>name<\/s>\r\n<s>neko<\/s>\r\n<s>ID<\/s>\r\n<i>123<\/i>\r\n<\/map> \r\n<\/pre>\n<pre lang=\"xml\">\r\n<List>\r\n<String>cat<\/String>\r\n<String>dog<\/String>\r\n<integer>673<\/Integer>\r\n<\/List> \r\nvs:\r\n<list>\r\n<s>cat<\/s>\r\n<s>dog<\/s>\r\n<i>673<\/i>\r\n<\/list>\r\n<\/pre>\n<pre lang=\"xml\">\r\n<Long>123456789<\/Long> \r\nvs: N\/A\r\n<\/pre>\n<pre lang=\"xml\">\r\n<Date>20020911 09:15:00<\/Date> \r\nvs: \r\nN\/A\r\n<\/pre>\n<span id=\"Using_XML_Objects_in_XPRESS\"><h2>Using XML Objects in XPRESS<\/h2><\/span>\n<p>* You can use XML objects within XPRESS anywhere an expression is allowed. In the example below, a map is passed as an argument to an invoked method:<\/p>\n<pre lang=\"xml\">\r\n<invoke name='printTheMap'>\r\n    <ref>mapPrinter<\/ref>\r\n       <Map>\r\n       <\/Map>\r\n<\/invoke>\r\n<\/pre>\n<span id=\"Example_1_using_both_types_of_syntax\"><h3>Example 1, using both types of syntax<\/h3><\/span>\n<pre lang=\"xml\">\r\n<Form>\r\n    <Field name='department'>\r\n      <Display class='Select'>\r\n        <Property name='allowedValues'>\r\n          <List>\r\n           <String>Engineering<\/String>\r\n           <String>Marketing<\/String>\r\n           <String>Sales<\/String>\r\n          <\/List>\r\n        <\/Property>\r\n      <\/Display>\r\n    <\/Field>\r\n \r\n    <Field name='department2'>\r\n      <Display class='Select'>\r\n        <Property name='allowedValues'>\r\n          <expression>\r\n            <list>\r\n              <s>Engineering<\/s>\r\n              <s>Marketing<\/s>\r\n              <s>Sales<\/s>\r\n            <\/list>\r\n          <\/expression>\r\n        <\/Property>\r\n      <\/Display>\r\n    <\/Field>\r\n<\/Form>\r\n<\/pre>\n<span id=\"Example_2:_Using_XML_Object_Syntax_to_Map_Objects\"><h3>Example 2: Using XML Object Syntax to Map Objects<\/h3><\/span>\n<pre lang=\"xml\">\r\n<Map>\r\n   <MapEntry key='name' value='Jeff'\/>\r\n   <MapEntry key='phone' value='338-1818'\/>\r\n<\/Map>\r\n<\/pre>\n<p>vs:<\/p>\n<pre lang=\"xml\">\r\n<map>\r\n   <s>name<\/s>\r\n   <s>Jeff<\/s>\r\n   <s>phone<\/s>\r\n   <s>338-1818<\/s>\r\n<\/map>\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"https:\/\/docs.oracle.com\/cd\/E19225-01\/820-5821\/bvbye\/index.html\">Chapter 6 XML Object Language<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Intro * Often used in forms &#8211; especially a list of allowed values for Select or MultiSelect fields * Can also be used in workflows and rules * For example: Alabama Alaska Arizona Arkansas California Washington Washington D.C. West Virginia &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=10747\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[530],"tags":[651,541],"class_list":["post-10747","post","type-post","status-publish","format-standard","hentry","category-sunidm","tag-sunidm","tag-xmlobject"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2Nl","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10747"}],"version-history":[{"count":3,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10747\/revisions"}],"predecessor-version":[{"id":10750,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/10747\/revisions\/10750"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}