You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by harshabi <sr...@gmail.com> on 2008/03/03 07:25:15 UTC

Adding a DOCTYPE to the created xml

Adding a DOCTYPE to the created xml
Hi all,
How can i add a DOCTYPE Declaration like "<!DOCTYPE name SYSTEM "name.dtd"
[...]>" in my xml Newly created using CreateDOMDocument(); call??How to use
the DOMDocumentType variable to do this??? 
-- 
Thanks and Regards
Sree Harsha Vardhana S.N
"When you want something, all the universe conspires in helping you to
achieve it." 
-- 
View this message in context: http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p15798352.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


RE: Adding a DOCTYPE to the created xml

Posted by Jesse Pelton <js...@PKC.com>.
The DOMPrint sample includes code that shows how to perform validation. 

-----Original Message-----
From: harshabi [mailto:sree.harsha.sn@gmail.com] 
Sent: Monday, March 03, 2008 10:04 AM
To: c-users@xerces.apache.org
Subject: RE: Adding a DOCTYPE to the created xml


thanks for the reply.. I noticed that i was creating the doctype object
using
DOMImplementation::createDocumentType but not passing it on to
DOMImplementation::createDocument()..How can i verify the file created
afterwards using the dtd??? please let me know....



Jesse Pelton wrote:
> 
> Assuming you're using DOMImplementation::getImplementation() to get a
> DOM implementation pointer, you can call
> DOMImplementation::createDocumentType() and pass the resulting object
to
> DOMImplementation::createDocument().
> 
> There are also non-standard DOMDocument::createDocumentType() methods.
> I haven't used them, but presumably you'd need to append the returned
> document type node to the document node.
> 
> -----Original Message-----
> From: harshabi [mailto:sree.harsha.sn@gmail.com] 
> Sent: Monday, March 03, 2008 1:25 AM
> To: c-users@xerces.apache.org
> Subject: Adding a DOCTYPE to the created xml
> 
> 
> Adding a DOCTYPE to the created xml
> Hi all,
> How can i add a DOCTYPE Declaration like "<!DOCTYPE name SYSTEM
> "name.dtd"
> [...]>" in my xml Newly created using CreateDOMDocument(); call??How
to
> use
> the DOMDocumentType variable to do this??? 
> -- 
> Thanks and Regards
> Sree Harsha Vardhana S.N
> "When you want something, all the universe conspires in helping you to
> achieve it." 
> -- 
> View this message in context:
>
http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p157
> 98352.html
> Sent from the Xerces - C - Users mailing list archive at Nabble.com.
> 
> 
> 
:-/:sleep::sleep::-/:-/
-- 
View this message in context:
http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p158
05802.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


RE: Adding a DOCTYPE to the created xml

Posted by harshabi <sr...@gmail.com>.
thanks for the reply.. I noticed that i was creating the doctype object using
DOMImplementation::createDocumentType but not passing it on to
DOMImplementation::createDocument()..How can i verify the file created
afterwards using the dtd??? please let me know....



Jesse Pelton wrote:
> 
> Assuming you're using DOMImplementation::getImplementation() to get a
> DOM implementation pointer, you can call
> DOMImplementation::createDocumentType() and pass the resulting object to
> DOMImplementation::createDocument().
> 
> There are also non-standard DOMDocument::createDocumentType() methods.
> I haven't used them, but presumably you'd need to append the returned
> document type node to the document node.
> 
> -----Original Message-----
> From: harshabi [mailto:sree.harsha.sn@gmail.com] 
> Sent: Monday, March 03, 2008 1:25 AM
> To: c-users@xerces.apache.org
> Subject: Adding a DOCTYPE to the created xml
> 
> 
> Adding a DOCTYPE to the created xml
> Hi all,
> How can i add a DOCTYPE Declaration like "<!DOCTYPE name SYSTEM
> "name.dtd"
> [...]>" in my xml Newly created using CreateDOMDocument(); call??How to
> use
> the DOMDocumentType variable to do this??? 
> -- 
> Thanks and Regards
> Sree Harsha Vardhana S.N
> "When you want something, all the universe conspires in helping you to
> achieve it." 
> -- 
> View this message in context:
> http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p157
> 98352.html
> Sent from the Xerces - C - Users mailing list archive at Nabble.com.
> 
> 
> 
:-/:sleep::sleep::-/:-/
-- 
View this message in context: http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p15805802.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


RE: Adding a DOCTYPE to the created xml

Posted by Jesse Pelton <js...@PKC.com>.
Assuming you're using DOMImplementation::getImplementation() to get a
DOM implementation pointer, you can call
DOMImplementation::createDocumentType() and pass the resulting object to
DOMImplementation::createDocument().

There are also non-standard DOMDocument::createDocumentType() methods.
I haven't used them, but presumably you'd need to append the returned
document type node to the document node.

-----Original Message-----
From: harshabi [mailto:sree.harsha.sn@gmail.com] 
Sent: Monday, March 03, 2008 1:25 AM
To: c-users@xerces.apache.org
Subject: Adding a DOCTYPE to the created xml


Adding a DOCTYPE to the created xml
Hi all,
How can i add a DOCTYPE Declaration like "<!DOCTYPE name SYSTEM
"name.dtd"
[...]>" in my xml Newly created using CreateDOMDocument(); call??How to
use
the DOMDocumentType variable to do this??? 
-- 
Thanks and Regards
Sree Harsha Vardhana S.N
"When you want something, all the universe conspires in helping you to
achieve it." 
-- 
View this message in context:
http://www.nabble.com/Adding-a-DOCTYPE-to-the-created-xml-tp15798352p157
98352.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.