IXMLDOMNode.NodeName是只读的,各位有什么办法改变这个NodeName的值,即:
<Caption>标题</Caption>改变"Caption"为其他的值变成如:<Hint>标题</Hint>
分不够再加!
<Caption>标题</Caption>改变"Caption"为其他的值变成如:<Hint>标题</Hint>
分不够再加!
解决方案 »
- $嫦娥散分$
- 如何在一个文本文件中写入二进制数据???
- 怎么给另一个程序发送消息执行指定的操作?
- 帮忙写如下要求的一个Oralce的过程,会Oracle的进来看看。急!
- 最好是有关开发控件的网址!!!!!!!!!!!!!
- 如何在quickreport强制分页
- 本小姐会走路了,可是屏幕上的那个又找不到了。很简单的呀,求你们看一下。刚发的帖子~~~
- 为什么win2000下面csdn看起来是宋体,98是楷体。up有分。
- 再次请教StringGrid的问题,请各位高人指教!
- 用OLE操作word的问题
- win2k不可以打印设置自定义页面。我的针式打印机打出来的总是一页打两页,hp6l的就没问题
- 那位大哥知道2004年下半年软件工程师资格考试教材那里有?
srcxn.ParentNode.ChildNodes.Remove(oldxn); // delete the node
targetxn.ChildNodes.Add(xns); // add node to target node
procedure ReNameNodeByPathString(XMLDOC: IXMLDOMDocument; PathStr, NewName: String);
var
i: Integer;
Attributes: IXMLDOMNamedNodeMap;
SpecXMLNode, NewXMLNode: IXMLDOMNode;
begin
SpecXMLNode:=XMLDOC.selectSingleNode(PathStr);
if SpecXMLNode <> nil then
begin
NewXMLNode:=XMLDOC.createNode(NODE_ELEMENT,NewName,''); Attributes:=(SpecXMLNode as IXMLDOMElement).attributes;
for i := 0 to Attributes.length - 1 do
(NewXMLNode as IXMLDOMElement).setAttribute(Attributes.item[i].nodeName,Attributes.item[i].nodeValue); SpecXMLNode:=SpecXMLNode.parentNode.replaceChild(NewXMLNode,SpecXMLNode);
while SpecXMLNode.childNodes.length <> 0 do
NewXMLNode.appendChild(SpecXMLNode.removeChild(SpecXMLNode.childNodes.item[0])); SpecXMLNode:=nil;
end;
LanguageTrans.Modify:=True;
end;