Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Parsing an XML-like definition of an XML-like language to create a parser of the actual data in that language.

by Fletch (Bishop)
on Nov 16, 2006 at 20:08 UTC ( [id://584587]=note: print w/replies, xml ) Need Help??


in reply to Parsing an XML-like definition of an XML-like language to create a parser of the actual data in that language.

You're a bit confuzzled about the purpose of a DTD. A DTD describes what a particular (X|SG)ML document will contain, but it's not required to generate a document conforming to that DTD. It's more for use by other tools to determine if a particular well-formed (X|SG)ML document (i.e. one which conforms to the syntax requirements) is a valid document (i.e. has the expected semantic contents and layout).

There are tools (SGML aware editors and the like) which can use a DTD to provide more intelligent editing (perhaps giving dropdown lists for attribute values, for example), but unless you're writing one of those you really just need to understand what the DTD is describing and generate your output according to its expectations.

  • Comment on Re: Parsing an XML-like definition of an XML-like language to create a parser of the actual data in that language.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://584587]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-19 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found