夜行兰若寺 夜行兰若寺
关注数: 32 粉丝数: 71 发帖数: 939 关注贴吧数: 140
[求助]OutXMLDoc问题 各位大神帮忙看下,需要输出xml文件如下: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C/DTD SVG 1.1//EN" "http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd&urlrefer=421b8646fc9d004d5190b2d1bc73568b"> <svg version="1.1" xml:space="preserve" xmlns:xlink="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink&urlrefer=c9b08b1360bd9e21fbc102faa4466649" xmlns="http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg&urlrefer=b58448e393904399dd5ca48ef09d8e46" > ....... 代码如下: var Hfile:file; i,j,k:integer; OutXMLDoc:IXMLDocument; Root,Parent_Node,Child_Node,ChildChild_Node,temp_Node,temp_Node1,temp_Node2:IXMLNode; begin OutXMLDoc := TXMLDocument.Create(nil); OutXMLDoc.Active := true; OutXMLDoc.Version:='1.0'; //OutXMLDoc.Encoding:= 'GB2312'; OutXMLDoc.standalone:='no'; OutXMLDoc.Options := OutXMLDoc.Options + [doNodeAutoIndent]; Root := OutXMLDoc.AddChild('svg'); //建根结点 Root.SetAttributeNS('version','','1.1'); Root.SetAttributeNS('xml:space','','preserve'); Root.SetAttributeNS('xmlns:xlink','','http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink&urlrefer=c9b08b1360bd9e21fbc102faa4466649'); ...... end xml version 和根节点svg之间的<!DOCTYPE svg PUBLIC "-//W3C/DTD SVG 1.1//EN" "http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd&urlrefer=421b8646fc9d004d5190b2d1bc73568b">怎么输出啊,刚接触delphi不久,IXMLDocument不是很熟悉....
1 下一页