小编XPe*_*cto的帖子

你能改变.git文件夹的位置吗?

所有git repos在工作目录中创建.git文件夹都可以更改此文件夹位置.

git

9
推荐指数
1
解决办法
4809
查看次数

在XMLDocument中使用DocumentElement时发生访问冲突

当我尝试使用我总是得到一个访问冲突DocumentElementXMLDocument.我XMLDocument根据一些文件的存在创建.

错误信息

项目project1.exe引发异常类EAccessViolation,消息'模块'地址0047B152中的访问冲突'project1.exe'.地址B1D59357'

我的代码

unit XMLBase;

interface
uses
  SysUtils, xmldom, XMLIntf, XMLDoc, Forms;

type
  TXMLbase = class
  private
    { Private declarations }
  public
    XMLDocument1: TXMLDocument;
    root: IXMLNode;    
    constructor Create;
  end;

var
  fn: string;

implementation

constructor TXMLbase.Create;
begin   
  fn := ChangeFileExt(Application.ExeName, '.xml');
  XMLDocument1 := TXMLDocument.Create(nil);
  XMLDocument1.Options := [doNodeAutoIndent];
  XMLDocument1.Active := False;
  //optional, is used to indent the Xml document
  if FileExists(fn) then
  begin
  XMLDocument1.LoadFromFile(fn);
  XMLDocument1.Active:= True;
  root := XMLDocument1.DocumentElement;  //<<--- Access Voilation
  end
  else
  begin …
Run Code Online (Sandbox Code Playgroud)

delphi xmldocument

7
推荐指数
2
解决办法
4500
查看次数

为什么Delphi IDE还包含.NET代码而不仅仅是Object Pascal

可能重复:
为什么VCL/RTL中有这么多$ IF DEFINED(CLR)?

我知道Delphi 7是用Object Pascal(Delphi)编写的,但自2003年12月发布的Delphi 8以来,它只是一个.NET版本,它将Delphi Object Pascal代码编译成.NET CIL.为此目的重写了IDE.

delphi

3
推荐指数
1
解决办法
247
查看次数

标签 统计

delphi ×2

git ×1

xmldocument ×1