Type: BOOLEAN
Description: Boolean is used to
represent TRUE, FALSE states. It is similar to boolean type in programming
languages.
Example
isPassedInExam
BOOLEAN ::= TRUE
canIReadTheFile
BOOLEAN ::= FALSE
Example schema
Employee ::= SEQUENCE { firstName VisibleString, lastName VisibleString, isPermanentEmployee BOOLEAN }
Data
can be represented like below.
employee1 Employee ::= { firstName "Hari Krishna", lastName "Gurram", isPermanentEmployee FALSE }
employee2 Employee ::= { firstName "Venkata", lastName "Madala", isPermanentEmployee TRUE }
XML
encoding of the above data looks like below.
<?xml version="1.0" encoding="UTF-8"?> <Employee> <firstName>Hari Krishna</firstName> <lastName>Gurram</lastName> <isPermanentEmployee><false/></isPermanentEmployee> </Employee>
<?xml version="1.0" encoding="UTF-8"?> <Employee> <firstName>Venkata</firstName> <lastName>Madala</lastName> <isPermanentEmployee><true/></isPermanentEmployee> </Employee>
No comments:
Post a Comment