XML

XML – XSD Miscellaneous Data Types

Other miscellaneous data types are boolean, base64Binary, hexBinary, float, double, anyURI, QName, and NOTATION. Boolean Data Type The boolean data type is used to specify a true or false value. The following is an example of a boolean declaration in…

XML – XSD Numeric Data Types

Decimal data types are used for numeric values. Decimal Data Type The decimal data type is used to specify a numeric value. The following is an example of a decimal declaration in a schema: <xs:element name=”price” type=”xs:decimal”/> An element in…

XML – XSD Date and Time Data Types

Date and time data types are used for values that contain date and time. Date Data Type The date data type is used to specify a date. The date is specified in the following form “YYYY-MM-DD” where: YYYY indicates the…

XML – XSD String Data Types

String data types are used for values that contains character strings. String Data Type The string data type can contain characters, line feeds, carriage returns, and tab characters. The following is an example of a string declaration in a schema:…

XML – XSD Element Substitution

With XML Schemas, one element can substitute another element. Element Substitution Let’s say that we have users from two different countries: England and Norway. We would like the ability to let the user choose whether he or she would like…

XML – XSD The Element

The <anyAttribute> element enables us to extend the XML document with attributes not specified by the schema! The <anyAttribute> Element The <anyAttribute> element enables us to extend the XML document with attributes not specified by the schema. The following example…

XML – XSD The Element

The <any> element enables us to extend the XML document with elements not specified by the schema! The <any> Element The <any> element enables us to extend the XML document with elements not specified by the schema. The following example…

XML – XSD Indicators

We can control HOW elements are to be used in documents with indicators. Indicators There are seven indicators: Order indicators: All Choice Sequence Occurrence indicators: maxOccurs minOccurs Group indicators: Group name attributeGroup name Order Indicators Order indicators are used to…

XML – XSD Mixed Content

A mixed complex type element can contain attributes, elements, and text. Complex Types with Mixed Content An XML element, “letter”, that contains both text and other elements: <letter>   Dear Mr. <name>John Smith</name>.   Your order <orderid>1032</orderid>   will be…