Ask the Expert

Why a parser? And the difference between SGML and XML

What is the need for parser? What is the difference between SGML and XML?
An XML document has defined elements and attributes. A parser exposes them to your application so you don't need to write code to break scan the tags and retrieve individual attributes. SGML defines SGML this way:

SGML (Standard Generalized Markup Language) is a standard for how to specify a document markup language or tag set. Such a specification is itself a document type definition (DTD). SGML is not in itself a document language, but a description of how to specify one. It is metadata.
XML, like HTML, is a SGML-based language. XML is extensible because the markup symbols are unlimited and self-defining.

This was first published in April 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: