maxLength

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sudhesh

    maxLength

    Hi,
    I understand I can write an XSD file like...

    <xs:attribute name = "value1" use="required">
    <xs:simpleTyp e>
    <xs:restricti on base="xs:string ">
    <xs:maxLength value="30"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>


    I'm writing a class heirarchy that I want to serialize into XML and I'd
    like to incorporate the above mentioned restriction for maxlength in my
    class. If I have a Pulic value1 as string, how do I restrict it to 30
    characters? The only way I seem to have is to define it as a property
    and trim it in the set property section.

    My question is, is there a cleaner/nicer way, like the XML like
    <XMLElementAttr ibute()> decoration that can achieve the same?

    Thanks in advance
    Sudhesh

Working...