I was able to get things working ... just had to modify some things. To achieve the following output:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ia SYSTEM "ia.dtd">
<FirstElement/>

I did something like this (after creating my DOMImplementation, 'impl'):

    DOMDocumentType* myDocType = (DOMDocumentType *) impl->createDocumentType(X("ia"), NULL, X("ia.dtd"));
   
    // Create XML document
    DOMDocument* myDocument = impl->createDocument(NULL,NULL,myDocType);

The key thing for me to figure out here is that for things that I either (a) didn't understand or (b) didn't need, I could just send in a 'NULL' ... this took a little while for me to figure out :)

Thanks for the pointer in the right direction! It certainly made all the difference!

Brice

Brice Ruth wrote:
Hi,
(a)

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ia SYSTEM "ia.dtd">
<FirstElement/>
    

something like this

    fDocumentType = (DOMDocumentTypeImpl *) 
fDocument->createDocumentType(elemDecl.getFullName(), publicId, systemId);
    fDocument->setDocumentType(fDocumentType);
  
I'm not entirely sure what to pass for the args to createDocumentType ... also, the compiler is choking on what I *do* have saying that there is no matching function for call to xercesc_2_2::DOMDocument:: candidates are: virtual. I think I might need more hand-holding ... ?!? :(

Ideas?

Respectfully,
Brice Ruth

Reply via email to