Methods to create XML simple values
The following table lists static methods on the XmlSimpleValue type
that create XmlSimpleValue instances of various types.
|
Method signature |
Description |
|---|---|
|
|
Creates a URI instance |
|
|
Creates a base 64 binary instance from byte array |
|
|
Creates a base 64 binary instance from binary data provider |
|
|
Creates a |
|
|
Creates a byte instance |
|
|
Creates a date-time instance from an |
|
|
Creates a date instance from an |
|
|
Creates a decimal instance from a |
|
|
Creates a decimal instance from a |
|
|
Creates a duration instance |
|
|
Creates a float instance |
|
|
Creates a GDay instance (the numerical day of the month) |
|
makeGMonthDayInstance(gw.xml.date.XmlMonthDay) |
Creates a |
|
makeGMonthInstance(gw.xml.date.XmlMonth) |
Creates a |
|
makeGYearInstance(gw.xml.date.XmlYear) |
Creates a |
|
makeGYearMonthInstance(gw.xml.date.XmlYearMonth) |
Creates a |
|
|
Creates a hex binary instance from byte array |
|
|
Creates an |
|
|
Creates an |
|
|
Creates a big integer instance |
|
|
Creates an integer instance |
|
|
Creates a long integer instance |
|
|
Creates a |
|
|
Creates a |
|
|
Creates a duration instance |
|
|
Creates a |
|
|
Creates a duration instance |
|
|
Creates an unsigned byte instance |
|
|
Creates an unsigned integer instance |
|
|
Creates an unsigned long integer instance |
|
|
Creates an unsigned short integer instance |
The following example creates instances of GDay, GMonthDay, GMonth, GYear and GYearMonth:
uses gw.xml.date.XmlDate
uses gw.xml.date.XmlDay
uses gw.xml.date.XmlMonth
uses gw.xml.date.XmlMonthDay
uses gw.xml.date.XmlYear
uses gw.xml.date.XmlYearMonth
var mydate = new XmlDate("2018-12-11")
var cal = java.util.Calendar.getInstance()
var gd = new XmlDay(cal, false)
var gmd = new XmlMonthDay(cal, false)
var gm = new XmlMonth(cal, false)
var gy = new XmlYear(cal, false)
var gym = new XmlYearMonth(cal, false)
print('Gday: ' + XmlSimpleValue.makeGDayInstance(gd))
print('GMonthDay: ' + XmlSimpleValue.makeGMonthDayInstance(gmd))
print('GMonth: ' + XmlSimpleValue.makeGMonthInstance(gm))
print('GYear: ' + XmlSimpleValue.makeGYearInstance(gy))
print('GYearMonth: ' + XmlSimpleValue.makeGYearMonthInstance(gym))
Gday: Simple value (gw.xml.date.XmlDay): ---11
GMonthDay: Simple value (gw.xml.date.XmlMonthDay): --12-11
GMonth: Simple value (gw.xml.date.XmlMonth): --12
GYear: Simple value (gw.xml.date.XmlYear): 2018
GYearMonth: Simple value (gw.xml.date.XmlYearMonth): 2018-12var mydate = new XmlDate("2018-12-11")
var gd = new XmlDay("---11")
var gmd = new XmlMonthDay("--12-11")
var gm = new XmlMonth("--12")
var gy = new XmlYear("2018")
var gym = new XmlYearMonth("1900-03")
var dt = new XmlDateTime("2000-01-12T12:13:14-07:00");
var dur = new XmlDuration("P50MT50M50")
See also
