Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Mon, 28 Jul 2008 22:29:00 -0700,    group: microsoft.public.xml        back       


Can we read DTD using MSXML6.0.   
Platform : WindowsXP, VisualStudio 2005, VC++, MSXML6.0



Hello,

	I want to know if it is possible in MSXML6.0 to load dtd.
That is, is there any class available in MSXML to load DTD.
Is it possible to carry out this task using IXMLDOMDocument2 class.
Also further is it possible to load the list of elements, attributes and 
entities od loaded DTD in object of some class.
If this is possible can any one please tell me how it is carried out.
Are there any Sample Programs Available.
It will be of great help to me if some sample programs are provided.
Related Links will be as much good.


I am providing code as follows which i tried to load dtd


CLSID rclsid;
typedef ABIMSXML::IXMLDOMDocument2Ptr ABIMSXMLDOMDocument2;
ABIMSXMLDOMDocument2 m_pXMLDoc = NULL;
GetMSXML_CLSID(rclsid);
HRESULT hr = m_pXMLDoc.CreateInstance(__uuidof(ABIMSXML::DOMDocument60));	

typedef ABIMSXML::IXMLDOMDocumentPtr ABIMSXMLDOMDocument;
ABIMSXMLDOMDocument m_pXSDDoc = NULL;
hr = m_pXSDDoc.CreateInstance(__uuidof(ABIMSXML::DOMDocument60));
			
m_pXSDDoc->async =  VARIANT_FALSE; 
m_pXMLDoc->setProperty("ProhibitDTD", VARIANT_FALSE);
string fname;


hr  =  m_pXSDDoc->load("test.dtd");
			
if(hr!=S_OK)
{
	return;
}


			
	I dont know whether dtd get loaded or not.Can any one tell me how to check 
it.
If it has succesfully get loaded what must be the further step to access 
dtds contents.

Thanks & Regards

Asmita
date: Mon, 28 Jul 2008 22:29:00 -0700   author:   Asmita

Re: Can we read DTD using MSXML6.0.   
Asmita wrote:
> Platform : WindowsXP, VisualStudio 2005, VC++, MSXML6.0

> 	I want to know if it is possible in MSXML6.0 to load dtd.
> That is, is there any class available in MSXML to load DTD.

I don't think there is a class or object to load a DTD alone. What MSXML 
supports is parsing an XML document that links to a DTD and validating 
the XML against the DTD. But I don't know of an API of MSXML to parse a 
DTD alone.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
date: Tue, 29 Jul 2008 13:23:56 +0200   author:   Martin Honnen

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us