Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2006, 06:22 AM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default parsing XHTML document

Hi all,

I try to parse a XHTML document with a transitional doctype

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


I load the xhtml code in a XMLDOM object, via an ASP page


  Set objDoc = Server.CreateObject("Microsoft.XMLDOM")
  objDoc.async = False
  strFile = str
  objDoc.Load strFile


but the script hangs on and I get the following error

Error: The system cannot locate the resource specified. Error processing resource 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'.

I test my page on a local server, but my pc is connected to Internet without any restrictions

Any idea?

Thanks (and sorry for my poor english )

 
Old March 21st, 2006, 06:39 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Firstly use a modern parser:
Code:
Server.CreateObject("Msxml.DomDocument.x.0")
where x is the latest version on the server, at least 4 would be nice.

Secondly set validateOnParse to false before loading the document is you don't want it validated against the DTD.

--

Joe (Microsoft MVP - XML)
 
Old March 22nd, 2006, 03:51 AM
Registered User
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Joe

thanks for your solution, it seems working

Jean-Philippe :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
XSLT for parsing XHTML Form shahbhat XSLT 6 August 26th, 2008 06:22 PM
XHTML Validation nairaby HTML Code Clinic 2 August 11th, 2007 02:45 AM
Beginning XHTML Lynk Wrox Book Feedback 1 March 1st, 2005 11:16 PM
XHTML rajpalan HTML Code Clinic 9 October 20th, 2003 02:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.