XSD – Attribute

  • Post author:
  • Post category:XSD
  • Post comments:1 Comment

Attribute represents the attribute of an XML element. XSD defines it as a simple type. Syntax <xs:attribute name = "attribute-name" type = "attribute-type"/> attribute-nameName of the Attribute. For example,<xs:attribute name…

Continue ReadingXSD – Attribute

XSD – Element

  • Post author:
  • Post category:XSD
  • Post comments:1 Comment

Simple Element is an XML element which can only have text. It can not contain any attribute. Syntax <xs:element name = "element-name" type = "element-type"/> element-nameName of the XML Element.…

Continue ReadingXSD – Element

XSD – Validation

  • Post author:
  • Post category:XSD
  • Post comments:0 Comments

We'll use Java based XSD validator to validate students.xml against the students.xsd. students.xml <?xml version = "1.0"?> <class> <student rollno = "393"> <firstname>Dinkar</firstname> <lastname>Kad</lastname> <nickname>Dinkar</nickname> <marks>85</marks> </student> <student rollno = "493"> <firstname>Vaneet</firstname> <lastname>Gupta</lastname>…

Continue ReadingXSD – Validation