*
The moose likes XML and Related Technologies and the fly likes DTD in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "DTD in XML" Watch "DTD in XML" New topic
Author

DTD in XML

Mi Na Mi
Greenhorn

Joined: Jan 09, 2012
Posts: 4
Hello,
I have 2 xml files with dtd defined right inside the xml files. I merge those two files, but the output xml file is completely missed. Is any way to read a definition of dtd inside the xml??
Thank you.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18709
    
    8

The parser will take care of reading the DTD, it's not up to you. I don't understand what this "output file" is and what it means for it to be "completely missed", though. Perhaps you could explain in a bit more detail?
Mi Na Mi
Greenhorn

Joined: Jan 09, 2012
Posts: 4
I merge two xml files, and both of them have dtd declaration, but merged file does not contain a dtd
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18709
    
    8

That's because you didn't put one there. You didn't say how you merged the two files, but there's no reason why the merged result should have any DTD at all and no reason why a DTD for the merged result should have any relationship with the DTDs for the input files. So if you want the result to have a DTD, it's up to you to make that happen.
Mi Na Mi
Greenhorn

Joined: Jan 09, 2012
Posts: 4
 
jQuery in Action, 2nd edition
 
subject: DTD in XML