0
我有點卡住了XML命名空間。我想請求幫助。使用XMLDOM命名空間
我需要什麼...我的命名空間看起來像:
<?xml version="1.0" encoding="iso-8859-2"?>
<Application_data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
我所做的是:
procedure BeginExport;
var
FOutputXML: IXMLDOMDocument;
vNode: IXMLDOMNode;
begin
DoBeginBeginExport;
if FOutputXML = nil then
begin
FOutputXML := CoDOMDocument.Create;
FOutputXML.appendChild(FOutputXML.createProcessingInstruction('xml', 'version="1.0" encoding="iso-8859-2"'));
vNode := FOutputXML.appendChild(FOutputXML.createElement('Application_data'));
vNode.attributes.setNamedItem(vNode.ownerDocument.createAttribute('????')).text := '"http://www.w3.org/2001/XMLSchema-instance';
end else FOutputXML.removeChild(FOutputXML.firstChild);
DoAfterBeginExport;
end;
有了:Createattribute後 「的xmlns XSI」 不起作用。任何人都可以幫助我,我錯了什麼或設置命名空間屬性的最簡單方法是什麼?
查看http://stackoverflow.com/questions/6992597/ –