Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

skip DTD in xml load

Status
Not open for further replies.

edelwater

Programmer
Jun 29, 2000
203
EU
Hi, i have a question i have some xmls with in the header :

Code:
<?xml version="1.0"?>
<!DOCTYPE TestAsset SYSTEM "TestAsset.dtd">

However this TestAsset is not present, is there any way to skip it during the doc.Load(rtxmlfile) ? (Since it now generates an error)

--
 
You could read the XML into a string, remove that line and then use the LoadXml of XMLDocument to load the string.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Thanks, i was thinking about this too but then i found another solution just on the moment i wanted to apply this solution:

Code:
doc.XmlResolver = null;
doc.Load(rtxmlfile);

(!)

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top