Joep De Vocht wrote:
How do I generate the desired header with the appropriate quotes:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ADELcalibrationModuleLayout:ModuleLayout 
xmlns:ADELcalibrationModuleLayout="http://www.asml.com/XMLSchema/MT/Generic/ADELcalibrationModuleLayout/v1.0
 xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://www.asml.com/XMLSchema/MT/Generic/ADELcalibrationModuleLayout/v1.0
 ADELcalibrationModuleLayout_PKNE.xsd">

If you mean

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ADELcalibrationModuleLayout:ModuleLayout xmlns:ADELcalibrationModuleLayout="http://www.asml.com/XMLSchema/MT/Generic/ADELcalibrationModuleLayout/v1.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.asml.com/XMLSchema/MT/Generic/ADELcalibrationModuleLayout/v1.0 ADELcalibrationModuleLayout_PKNE.xsd">

then you can do this:

DOMElement* rootElem = doc->getDocumentElement();

DOMAttr* attr = doc->createAttribute(X("xmlns:xsi"));
attr->setValue(X("http://www.w3.org/2001/XMLSchema-instance";));
rootElem->setAttributeNode(attr);

attr = doc->createAttribute(X("xsi:schemaLocation"));
attr->setValue(X("http://www.asml.com/XMLSchema/MT/Generic/ADELcalibrationModuleLayout/v1.0 ADELcalibrationModuleLayout_PKNE.xsd"));
rootElem->setAttributeNode(attr);

where X is the transcoding class.

Good luck!
        Vitaly

Reply via email to