iHi everyone?
How can i add this line to an XML file, using DOMDocument methods?
<!DOCTYPE ESHIPPER SYSTEM 'https://XXXXXXXXXXXXXXXXX.dtd'>
For adding this
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
I use:
XMLDomInst:= XMLDocOut.
createProcessingInstruction('xml','version="1.0" encoding="iso-8859-1" standalone="no"');
Which method could be used for adding the DOCTYPE?
Thank you very much!!
Answers
Check if this could help https://stackoverflow.com/questions/9882648/how-to-add-a-document-type-to-a-new-xml-file-in-c-sharp
Thanks for your answer. i was using that, in this way: where XMLDocOut is a DOMDocument. May be that is why it shows me he error that CreateDocumentType method doesn't exist. It is a "'Microsoft XML, v6.0'.DOMDocument" instead of a properly said XMLDocument. Any clues for this type of object?
https://msdn.microsoft.com/en-us/library/ms757828(v=vs.85).aspx
No hints about adding the DOCTYPE???
Check here. It says And that's what was suggested in the first link:
Your code should do something like this:
Maybe someone can better help you if you share your code ?
This is my code:
It looks like finally don't need to insert the doctype declaration, but I have to confirm that with the system owner later this morning. But anyway, it seems that the differences betwen XMLDocument and DOMDocument will create me a few more problem with the comunication, and when using http requests...
Thank you again, really appreciate!!!