http://qs321.pair.com?node_id=31700


in reply to RE: Doctype specific XML Validator
in thread Doctype specific XML Validator

Given that the whole point of XML is to leave room for expansion, my impression is that an individual or company can create a "proprietary" DTD (a document type definition) that describes their own XML format. Each format can include different types of objects. For an example, go to Moreover.com, click on the developers link, and compare the different formats that are based on XML. For instance, there's Netscape's definition called RSS, and there's Moreover.com's own format. You may also want to take a look at the W3C Web site for some of the actual specs on XML and other related technologies like XPath and XSL (both of which are really cool).

Because of the structure of XML itself, pretty much any format is easy to parse. It's just a matter of picking a way to parse it in Perl and then accessing the data. Most often, a person wishing to parse an XML document would use one of the styles in XML::Parser. For instance, one can use the stream style by setting handlers or the the objects style.

So, it's not really a matter of the individual or company wanting to make XML "their own." RSS and other definitions have come about because of the desire to have a common format so that headlines can be passed between sites on the Web (e.g. Slashdot and Freshmeat). XML's intrinsic flexibility allows individuals and companies to roll their own.

-ppm