summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorVadim Revyakin <vadimr@intel.com>2007-02-22 10:24:44 +0000
committerVadim Revyakin <vadimr@intel.com>2007-02-22 10:24:44 +0000
commit76328a1ba6b9c0e9e8461a860bdaa15ac06c320a (patch)
treed1c892bc39775191f54b34fc5a6265365c0df75c /examples
parentbb7687ae6b3b443d474c6d845219b6530bb59bad (diff)
downloadwsmancli-76328a1ba6b9c0e9e8461a860bdaa15ac06c320a.tar.gz
wsmancli-76328a1ba6b9c0e9e8461a860bdaa15ac06c320a.tar.xz
wsmancli-76328a1ba6b9c0e9e8461a860bdaa15ac06c320a.zip
SER_DEFAULT_NS(namespace) macro for serialization
Diffstat (limited to 'examples')
-rw-r--r--examples/serialize.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/serialize.c b/examples/serialize.c
index 59088db..a830ab4 100644
--- a/examples/serialize.c
+++ b/examples/serialize.c
@@ -173,8 +173,17 @@
if you want to skip the elements while deserialization(serialization). If
define SER_INOUT_* is used the element is skipped always.
+ SER_* defines create elements with default namespace prefix. Initialy this
+ prefix is abcent, i.e. QNames created without namespace prefix.
If element name is a QName (with name space prefix) the
SER_NS_*(ns, name, ..) define set must be used.
+ There is an optimization to create many elements with the same namespace
+ prefix. SER_* defines create elements with default namespace prefix.
+ Initialy this prefix is abcent, i.e. QNames created without namespace prefix.
+ macro SER_DEFAULT_NS(<ns>) does not describe any real element but sets
+ default namespace to <ns>. So all SER_* defines after SER_DEFAULT_NS(<ns>)
+ will create elements with namespace <ns>. SER_DEFAULT_NS(NULL) disables
+ default name prefix.
@@ -250,6 +259,7 @@ Sample_Servie servie = {
SER_START_ITEMS(Sample_Servie)
SER_BOOL("AcceptPause", 1),
SER_BOOL("AcceptStop", 1),
+SER_DEFAULT_NS(XML_NS_WSMAN_ID),
SER_STR("Caption", 1),
SER_UINT32("CheckPoint", 1),
SER_STR("CreationClassName", 1),
@@ -264,6 +274,7 @@ SER_STR("PathName", 1),
SER_UINT32("ProcessId", 1),
SER_UINT32("ServiceSpecificExitCode", 1),
SER_STR("ServiceType", 1),
+SER_DEFAULT_NS(NULL),
SER_BOOL("Started", 1),
SER_STR("StartMode", 1),
SER_STR("StartName", 1),