You could do something like this:
<xsd:element name="SetMonitor">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="period" type="xsd:long" nillable="true"/>
<xsd:element name="refreshrate" type="xsd:long" nillable="true"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
And construct xml with "empty" element in this way
<SetMonitor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<period>2147483647</period>
<refreshrate xsi:nil="true" />
</SetMonitor>
Or you could modify the type of element using pattern, something like this
<xsd:element name="period">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="|([1-9][0-9]*)" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
(the pattern has to be define more precisly, than I use for this example)
Another possibility could be to define simpleType for empty string
<xsd:simpleType name="emptyString">
<xsd:restriction base="xsd:string">
<xsd:length value="0"/>
</xsd:restriction>
</xsd:simpleType>
and then define your element as union of xsd:long and emptyString type
<xsd:element name="period">
<xsd:simpleType>
<xsd:union memberTypes="xsd:long emptyString"/>
</xsd:simpleType>
</xsd:element>