Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Using XML::Parser on a file without a !DOCTYPE line

by matija (Priest)
on Jun 19, 2004 at 06:10 UTC ( #368124=note: print w/ replies, xml ) Need Help??


in reply to Using XML::Parser on a file without a !DOCTYPE line

If the propper DOCTYPE were to be inserted, would it be the same doctype for all the documents? If so, you could append that line yourself, before you give it to XML::Parser to parse.


Comment on Re: Using XML::Parser on a file without a !DOCTYPE line
Re^2: Using XML::Parser on a file without a !DOCTYPE line
by moleary (Novice) on Jun 20, 2004 at 00:59 UTC
    There is a separate dtd file for each of the XML files I need to read, but I do know which dtd file goes with which XML file, so that could work. What do you mean by appending the line before giving the file to the parser? Do you mean to modify the XML file in some way, or to feed the !DOCTYPE line to the parser first and then give the xml file to the parser, or something else? Would it work to call the parser's function that takes a string with the !DOCTYPE line and then call the parser's function that takes a file handle with the XML file? Would the parser apply the dtd file declarations to the XML file if I made these two calls?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-08-27 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls