2010-10-06 81 views
4

實際上是一個簡單的問題。只是好奇,如果別人認識到這個問題,並可能有一個工作的解決方案...XML數據綁定向導沒有正確綁定XSD

我有一個簡單的XSD文件,我用它來定義我的應用程序使用的配置文件。我需要將這個模式綁定到我的項目,這是使用XDBW完成的。在Delphi 2007中,該向導只會將XSD識別爲模式,因此我將爲我的模式獲得完美的代碼。 我最近升級到Delphi XE,我想重新創建這個代碼,只是爲了它的樂趣。我可以使用舊的代碼,所以沒有問題。我只想看看D-XE是否增加了一些改進。 不幸的是,D-XE像解釋其他文件一樣解釋文件,並生成代碼來幫助我從代碼創建該模式。錚錚! (這是我頭撞牆的聲音......)我不想那樣!我想讓代碼生成由模式描述的XML! 那麼,這個問題是否爲其他用戶所熟悉?任何解決方案呢?


一個解決方案是隻使用D2007源文件。但這不是一個答案,因爲我需要從D-XE完全做到這一點。


另一種解決方法是將xsd文件重命名爲.biz擴展名。但這是一個非常醜陋的黑客...

+0

你可以寄給我那個xsd文件嗎? pluimers dot com幾乎可以做任何事情,尤其是當它包含我的名字時。 – 2010-10-07 09:16:04

+0

沒關係。我嘗試了十幾種不同的XSD,包括一些只有一個根元素的非常基本的XSD,沒有其他的東西。它將其解釋爲XML,而不是XSD。 (雖然它將.biz文件解釋爲XSD,但...) – 2010-10-07 12:58:55

回答

3

這確實是Delphi XE中的一個錯誤。 現在是在Embarcadero的bug跟蹤系統作爲入門88893

我嘗試使用XML數據綁定向導導入ASX.XSD文件下方的RAD Studio XE,它只是工作像你描述的:它進口的XSD如果它是XML而不是XSD。

<?xml version="1.0" encoding="utf-8"?> 
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <xsd:element name="asx" type="asxType" /> 
    <xsd:complexType name="asxType"> 
    <xsd:sequence> 
     <xsd:element name="title" type="xsd:string" /> 
     <xsd:element maxOccurs="unbounded" name="entry" type="entryType" /> 
    </xsd:sequence> 
    <xsd:attribute name="version" type="xsd:decimal" /> 
    </xsd:complexType> 
    <xsd:complexType name="entryType"> 
    <xsd:sequence> 
     <xsd:element name="title" type="xsd:string" /> 
     <xsd:element name="ref" type="refType" /> 
     <xsd:element name="author" type="xsd:string" /> 
    </xsd:sequence> 
    </xsd:complexType> 
    <xsd:complexType name="refType"> 
    <xsd:attribute name="href" type="xsd:string" /> 
    </xsd:complexType> 
</xsd:schema> 

這讓我這個單位:

{*****************************************************************************************************} 
{                          } 
{           XML Data Binding           } 
{                          } 
{   Generated on: 10/12/2010 9:41:06 PM               } 
{  Generated from: C:\develop\codeplex\TFS05\bo\Native\Delphi\Apps\NederlandFM2WMP\doc\ASX.xsd } 
{ Settings stored in: C:\develop\codeplex\TFS05\bo\Native\Delphi\Apps\NederlandFM2WMP\doc\ASX.xdb } 
{                          } 
{*****************************************************************************************************} 

unit ASX; 

interface 

uses xmldom, XMLDoc, XMLIntf; 

type 

{ Forward Decls } 

    IXMLSchemaType = interface; 
    IXMLElementType = interface; 
    IXMLComplexType = interface; 
    IXMLComplexTypeList = interface; 
    IXMLSequenceType = interface; 
    IXMLAttributeType = interface; 

{ IXMLSchemaType } 

    IXMLSchemaType = interface(IXMLNode) 
    ['{F8A90A02-2236-4A50-A278-CFBB8625B36C}'] 
    { Property Accessors } 
    function Get_AttributeFormDefault: UnicodeString; 
    function Get_ElementFormDefault: UnicodeString; 
    function Get_Version: UnicodeString; 
    function Get_Element: IXMLElementType; 
    function Get_ComplexType: IXMLComplexTypeList; 
    procedure Set_AttributeFormDefault(Value: UnicodeString); 
    procedure Set_ElementFormDefault(Value: UnicodeString); 
    procedure Set_Version(Value: UnicodeString); 
    { Methods & Properties } 
    property AttributeFormDefault: UnicodeString read Get_AttributeFormDefault write Set_AttributeFormDefault; 
    property ElementFormDefault: UnicodeString read Get_ElementFormDefault write Set_ElementFormDefault; 
    property Version: UnicodeString read Get_Version write Set_Version; 
    property Element: IXMLElementType read Get_Element; 
    property ComplexType: IXMLComplexTypeList read Get_ComplexType; 
    end; 

{ IXMLElementType } 

    IXMLElementType = interface(IXMLNode) 
    ['{9AAD80FD-06BC-4F82-9321-538F05522F83}'] 
    { Property Accessors } 
    function Get_Name: UnicodeString; 
    function Get_Type_: UnicodeString; 
    function Get_MaxOccurs: UnicodeString; 
    procedure Set_Name(Value: UnicodeString); 
    procedure Set_Type_(Value: UnicodeString); 
    procedure Set_MaxOccurs(Value: UnicodeString); 
    { Methods & Properties } 
    property Name: UnicodeString read Get_Name write Set_Name; 
    property Type_: UnicodeString read Get_Type_ write Set_Type_; 
    property MaxOccurs: UnicodeString read Get_MaxOccurs write Set_MaxOccurs; 
    end; 

{ IXMLComplexType } 

    IXMLComplexType = interface(IXMLNode) 
    ['{9C0618C5-D81F-4BB5-8DED-0BF9AF757ABD}'] 
    { Property Accessors } 
    function Get_Name: UnicodeString; 
    function Get_Sequence: IXMLSequenceType; 
    function Get_Attribute: IXMLAttributeType; 
    procedure Set_Name(Value: UnicodeString); 
    { Methods & Properties } 
    property Name: UnicodeString read Get_Name write Set_Name; 
    property Sequence: IXMLSequenceType read Get_Sequence; 
    property Attribute: IXMLAttributeType read Get_Attribute; 
    end; 

{ IXMLComplexTypeList } 

    IXMLComplexTypeList = interface(IXMLNodeCollection) 
    ['{26C4DF98-1DCA-44C8-9D58-9BEB9348FA5B}'] 
    { Methods & Properties } 
    function Add: IXMLComplexType; 
    function Insert(const Index: Integer): IXMLComplexType; 

    function Get_Item(Index: Integer): IXMLComplexType; 
    property Items[Index: Integer]: IXMLComplexType read Get_Item; default; 
    end; 

{ IXMLSequenceType } 

    IXMLSequenceType = interface(IXMLNodeCollection) 
    ['{9289143E-C0E2-462E-AD77-239966EEAEEC}'] 
    { Property Accessors } 
    function Get_Element(Index: Integer): IXMLElementType; 
    { Methods & Properties } 
    function Add: IXMLElementType; 
    function Insert(const Index: Integer): IXMLElementType; 
    property Element[Index: Integer]: IXMLElementType read Get_Element; default; 
    end; 

{ IXMLAttributeType } 

    IXMLAttributeType = interface(IXMLNode) 
    ['{409542A8-7FB2-4C90-BE41-C081A0518773}'] 
    { Property Accessors } 
    function Get_Name: UnicodeString; 
    function Get_Type_: UnicodeString; 
    procedure Set_Name(Value: UnicodeString); 
    procedure Set_Type_(Value: UnicodeString); 
    { Methods & Properties } 
    property Name: UnicodeString read Get_Name write Set_Name; 
    property Type_: UnicodeString read Get_Type_ write Set_Type_; 
    end; 

{ Forward Decls } 

    TXMLSchemaType = class; 
    TXMLElementType = class; 
    TXMLComplexType = class; 
    TXMLComplexTypeList = class; 
    TXMLSequenceType = class; 
    TXMLAttributeType = class; 

{ TXMLSchemaType } 

    TXMLSchemaType = class(TXMLNode, IXMLSchemaType) 
    private 
    FComplexType: IXMLComplexTypeList; 
    protected 
    { IXMLSchemaType } 
    function Get_AttributeFormDefault: UnicodeString; 
    function Get_ElementFormDefault: UnicodeString; 
    function Get_Version: UnicodeString; 
    function Get_Element: IXMLElementType; 
    function Get_ComplexType: IXMLComplexTypeList; 
    procedure Set_AttributeFormDefault(Value: UnicodeString); 
    procedure Set_ElementFormDefault(Value: UnicodeString); 
    procedure Set_Version(Value: UnicodeString); 
    public 
    procedure AfterConstruction; override; 
    end; 

{ TXMLElementType } 

    TXMLElementType = class(TXMLNode, IXMLElementType) 
    protected 
    { IXMLElementType } 
    function Get_Name: UnicodeString; 
    function Get_Type_: UnicodeString; 
    function Get_MaxOccurs: UnicodeString; 
    procedure Set_Name(Value: UnicodeString); 
    procedure Set_Type_(Value: UnicodeString); 
    procedure Set_MaxOccurs(Value: UnicodeString); 
    end; 

{ TXMLComplexType } 

    TXMLComplexType = class(TXMLNode, IXMLComplexType) 
    protected 
    { IXMLComplexType } 
    function Get_Name: UnicodeString; 
    function Get_Sequence: IXMLSequenceType; 
    function Get_Attribute: IXMLAttributeType; 
    procedure Set_Name(Value: UnicodeString); 
    public 
    procedure AfterConstruction; override; 
    end; 

{ TXMLComplexTypeList } 

    TXMLComplexTypeList = class(TXMLNodeCollection, IXMLComplexTypeList) 
    protected 
    { IXMLComplexTypeList } 
    function Add: IXMLComplexType; 
    function Insert(const Index: Integer): IXMLComplexType; 

    function Get_Item(Index: Integer): IXMLComplexType; 
    end; 

{ TXMLSequenceType } 

    TXMLSequenceType = class(TXMLNodeCollection, IXMLSequenceType) 
    protected 
    { IXMLSequenceType } 
    function Get_Element(Index: Integer): IXMLElementType; 
    function Add: IXMLElementType; 
    function Insert(const Index: Integer): IXMLElementType; 
    public 
    procedure AfterConstruction; override; 
    end; 

{ TXMLAttributeType } 

    TXMLAttributeType = class(TXMLNode, IXMLAttributeType) 
    protected 
    { IXMLAttributeType } 
    function Get_Name: UnicodeString; 
    function Get_Type_: UnicodeString; 
    procedure Set_Name(Value: UnicodeString); 
    procedure Set_Type_(Value: UnicodeString); 
    end; 

{ Global Functions } 

function Getschema(Doc: IXMLDocument): IXMLSchemaType; 
function Loadschema(const FileName: string): IXMLSchemaType; 
function Newschema: IXMLSchemaType; 

const 
    TargetNamespace = 'http://www.w3.org/2001/XMLSchema'; 

implementation 

{ Global Functions } 

function Getschema(Doc: IXMLDocument): IXMLSchemaType; 
begin 
    Result := Doc.GetDocBinding('schema', TXMLSchemaType, TargetNamespace) as IXMLSchemaType; 
end; 

function Loadschema(const FileName: string): IXMLSchemaType; 
begin 
    Result := LoadXMLDocument(FileName).GetDocBinding('schema', TXMLSchemaType, TargetNamespace) as IXMLSchemaType; 
end; 

function Newschema: IXMLSchemaType; 
begin 
    Result := NewXMLDocument.GetDocBinding('schema', TXMLSchemaType, TargetNamespace) as IXMLSchemaType; 
end; 

{ TXMLSchemaType } 

procedure TXMLSchemaType.AfterConstruction; 
begin 
    RegisterChildNode('element', TXMLElementType); 
    RegisterChildNode('complexType', TXMLComplexType); 
    FComplexType := CreateCollection(TXMLComplexTypeList, IXMLComplexType, 'complexType') as IXMLComplexTypeList; 
    inherited; 
end; 

function TXMLSchemaType.Get_AttributeFormDefault: UnicodeString; 
begin 
    Result := AttributeNodes['attributeFormDefault'].Text; 
end; 

procedure TXMLSchemaType.Set_AttributeFormDefault(Value: UnicodeString); 
begin 
    SetAttribute('attributeFormDefault', Value); 
end; 

function TXMLSchemaType.Get_ElementFormDefault: UnicodeString; 
begin 
    Result := AttributeNodes['elementFormDefault'].Text; 
end; 

procedure TXMLSchemaType.Set_ElementFormDefault(Value: UnicodeString); 
begin 
    SetAttribute('elementFormDefault', Value); 
end; 

function TXMLSchemaType.Get_Version: UnicodeString; 
begin 
    Result := AttributeNodes['version'].Text; 
end; 

procedure TXMLSchemaType.Set_Version(Value: UnicodeString); 
begin 
    SetAttribute('version', Value); 
end; 

function TXMLSchemaType.Get_Element: IXMLElementType; 
begin 
    Result := ChildNodes['element'] as IXMLElementType; 
end; 

function TXMLSchemaType.Get_ComplexType: IXMLComplexTypeList; 
begin 
    Result := FComplexType; 
end; 

{ TXMLElementType } 

function TXMLElementType.Get_Name: UnicodeString; 
begin 
    Result := AttributeNodes['name'].Text; 
end; 

procedure TXMLElementType.Set_Name(Value: UnicodeString); 
begin 
    SetAttribute('name', Value); 
end; 

function TXMLElementType.Get_Type_: UnicodeString; 
begin 
    Result := AttributeNodes['type'].Text; 
end; 

procedure TXMLElementType.Set_Type_(Value: UnicodeString); 
begin 
    SetAttribute('type', Value); 
end; 

function TXMLElementType.Get_MaxOccurs: UnicodeString; 
begin 
    Result := AttributeNodes['maxOccurs'].Text; 
end; 

procedure TXMLElementType.Set_MaxOccurs(Value: UnicodeString); 
begin 
    SetAttribute('maxOccurs', Value); 
end; 

{ TXMLComplexType } 

procedure TXMLComplexType.AfterConstruction; 
begin 
    RegisterChildNode('sequence', TXMLSequenceType); 
    RegisterChildNode('attribute', TXMLAttributeType); 
    inherited; 
end; 

function TXMLComplexType.Get_Name: UnicodeString; 
begin 
    Result := AttributeNodes['name'].Text; 
end; 

procedure TXMLComplexType.Set_Name(Value: UnicodeString); 
begin 
    SetAttribute('name', Value); 
end; 

function TXMLComplexType.Get_Sequence: IXMLSequenceType; 
begin 
    Result := ChildNodes['sequence'] as IXMLSequenceType; 
end; 

function TXMLComplexType.Get_Attribute: IXMLAttributeType; 
begin 
    Result := ChildNodes['attribute'] as IXMLAttributeType; 
end; 

{ TXMLComplexTypeList } 

function TXMLComplexTypeList.Add: IXMLComplexType; 
begin 
    Result := AddItem(-1) as IXMLComplexType; 
end; 

function TXMLComplexTypeList.Insert(const Index: Integer): IXMLComplexType; 
begin 
    Result := AddItem(Index) as IXMLComplexType; 
end; 

function TXMLComplexTypeList.Get_Item(Index: Integer): IXMLComplexType; 
begin 
    Result := List[Index] as IXMLComplexType; 
end; 

{ TXMLSequenceType } 

procedure TXMLSequenceType.AfterConstruction; 
begin 
    RegisterChildNode('element', TXMLElementType); 
    ItemTag := 'element'; 
    ItemInterface := IXMLElementType; 
    inherited; 
end; 

function TXMLSequenceType.Get_Element(Index: Integer): IXMLElementType; 
begin 
    Result := List[Index] as IXMLElementType; 
end; 

function TXMLSequenceType.Add: IXMLElementType; 
begin 
    Result := AddItem(-1) as IXMLElementType; 
end; 

function TXMLSequenceType.Insert(const Index: Integer): IXMLElementType; 
begin 
    Result := AddItem(Index) as IXMLElementType; 
end; 

{ TXMLAttributeType } 

function TXMLAttributeType.Get_Name: UnicodeString; 
begin 
    Result := AttributeNodes['name'].Text; 
end; 

procedure TXMLAttributeType.Set_Name(Value: UnicodeString); 
begin 
    SetAttribute('name', Value); 
end; 

function TXMLAttributeType.Get_Type_: UnicodeString; 
begin 
    Result := AttributeNodes['type'].Text; 
end; 

procedure TXMLAttributeType.Set_Type_(Value: UnicodeString); 
begin 
    SetAttribute('type', Value); 
end; 

end. 

但使用.BIZ擴展時,產生正確的單元:

{*****************************************************************************************************} 
{                          } 
{           XML Data Binding           } 
{                          } 
{   Generated on: 10/12/2010 9:47:29 PM               } 
{  Generated from: C:\develop\codeplex\TFS05\bo\Native\Delphi\Apps\NederlandFM2WMP\doc\ASX.biz } 
{ Settings stored in: C:\develop\codeplex\TFS05\bo\Native\Delphi\Apps\NederlandFM2WMP\doc\ASX.xdb } 
{                          } 
{*****************************************************************************************************} 

unit ASXUnit; 

interface 

uses xmldom, XMLDoc, XMLIntf; 

type 

{ Forward Decls } 

    IXMLAsxType = interface; 
    IXMLEntryType = interface; 
    IXMLEntryTypeList = interface; 
    IXMLRefType = interface; 

{ IXMLAsxType } 

    IXMLAsxType = interface(IXMLNode) 
    ['{491F413D-0118-47A0-A00E-1BB7FCAD96C2}'] 
    { Property Accessors } 
    function Get_Version: UnicodeString; 
    function Get_Title: UnicodeString; 
    function Get_Entry: IXMLEntryTypeList; 
    procedure Set_Version(Value: UnicodeString); 
    procedure Set_Title(Value: UnicodeString); 
    { Methods & Properties } 
    property Version: UnicodeString read Get_Version write Set_Version; 
    property Title: UnicodeString read Get_Title write Set_Title; 
    property Entry: IXMLEntryTypeList read Get_Entry; 
    end; 

{ IXMLEntryType } 

    IXMLEntryType = interface(IXMLNode) 
    ['{E1F7A8DC-0893-4853-BFFD-19D22AF3313C}'] 
    { Property Accessors } 
    function Get_Title: UnicodeString; 
    function Get_Ref: IXMLRefType; 
    function Get_Author: UnicodeString; 
    procedure Set_Title(Value: UnicodeString); 
    procedure Set_Author(Value: UnicodeString); 
    { Methods & Properties } 
    property Title: UnicodeString read Get_Title write Set_Title; 
    property Ref: IXMLRefType read Get_Ref; 
    property Author: UnicodeString read Get_Author write Set_Author; 
    end; 

{ IXMLEntryTypeList } 

    IXMLEntryTypeList = interface(IXMLNodeCollection) 
    ['{4CA3727D-89DA-4498-B617-48D413D63887}'] 
    { Methods & Properties } 
    function Add: IXMLEntryType; 
    function Insert(const Index: Integer): IXMLEntryType; 

    function Get_Item(Index: Integer): IXMLEntryType; 
    property Items[Index: Integer]: IXMLEntryType read Get_Item; default; 
    end; 

{ IXMLRefType } 

    IXMLRefType = interface(IXMLNode) 
    ['{0860418C-E35A-4315-8B1C-7C0D19C45740}'] 
    { Property Accessors } 
    function Get_Href: UnicodeString; 
    procedure Set_Href(Value: UnicodeString); 
    { Methods & Properties } 
    property Href: UnicodeString read Get_Href write Set_Href; 
    end; 

{ Forward Decls } 

    TXMLAsxType = class; 
    TXMLEntryType = class; 
    TXMLEntryTypeList = class; 
    TXMLRefType = class; 

{ TXMLAsxType } 

    TXMLAsxType = class(TXMLNode, IXMLAsxType) 
    private 
    FEntry: IXMLEntryTypeList; 
    protected 
    { IXMLAsxType } 
    function Get_Version: UnicodeString; 
    function Get_Title: UnicodeString; 
    function Get_Entry: IXMLEntryTypeList; 
    procedure Set_Version(Value: UnicodeString); 
    procedure Set_Title(Value: UnicodeString); 
    public 
    procedure AfterConstruction; override; 
    end; 

{ TXMLEntryType } 

    TXMLEntryType = class(TXMLNode, IXMLEntryType) 
    protected 
    { IXMLEntryType } 
    function Get_Title: UnicodeString; 
    function Get_Ref: IXMLRefType; 
    function Get_Author: UnicodeString; 
    procedure Set_Title(Value: UnicodeString); 
    procedure Set_Author(Value: UnicodeString); 
    public 
    procedure AfterConstruction; override; 
    end; 

{ TXMLEntryTypeList } 

    TXMLEntryTypeList = class(TXMLNodeCollection, IXMLEntryTypeList) 
    protected 
    { IXMLEntryTypeList } 
    function Add: IXMLEntryType; 
    function Insert(const Index: Integer): IXMLEntryType; 

    function Get_Item(Index: Integer): IXMLEntryType; 
    end; 

{ TXMLRefType } 

    TXMLRefType = class(TXMLNode, IXMLRefType) 
    protected 
    { IXMLRefType } 
    function Get_Href: UnicodeString; 
    procedure Set_Href(Value: UnicodeString); 
    end; 

{ Global Functions } 

function Getasx(Doc: IXMLDocument): IXMLAsxType; 
function Loadasx(const FileName: string): IXMLAsxType; 
function Newasx: IXMLAsxType; 

const 
    TargetNamespace = ''; 

implementation 

{ Global Functions } 

function Getasx(Doc: IXMLDocument): IXMLAsxType; 
begin 
    Result := Doc.GetDocBinding('asx', TXMLAsxType, TargetNamespace) as IXMLAsxType; 
end; 

function Loadasx(const FileName: string): IXMLAsxType; 
begin 
    Result := LoadXMLDocument(FileName).GetDocBinding('asx', TXMLAsxType, TargetNamespace) as IXMLAsxType; 
end; 

function Newasx: IXMLAsxType; 
begin 
    Result := NewXMLDocument.GetDocBinding('asx', TXMLAsxType, TargetNamespace) as IXMLAsxType; 
end; 

{ TXMLAsxType } 

procedure TXMLAsxType.AfterConstruction; 
begin 
    RegisterChildNode('entry', TXMLEntryType); 
    FEntry := CreateCollection(TXMLEntryTypeList, IXMLEntryType, 'entry') as IXMLEntryTypeList; 
    inherited; 
end; 

function TXMLAsxType.Get_Version: UnicodeString; 
begin 
    Result := AttributeNodes['version'].Text; 
end; 

procedure TXMLAsxType.Set_Version(Value: UnicodeString); 
begin 
    SetAttribute('version', Value); 
end; 

function TXMLAsxType.Get_Title: UnicodeString; 
begin 
    Result := ChildNodes['title'].Text; 
end; 

procedure TXMLAsxType.Set_Title(Value: UnicodeString); 
begin 
    ChildNodes['title'].NodeValue := Value; 
end; 

function TXMLAsxType.Get_Entry: IXMLEntryTypeList; 
begin 
    Result := FEntry; 
end; 

{ TXMLEntryType } 

procedure TXMLEntryType.AfterConstruction; 
begin 
    RegisterChildNode('ref', TXMLRefType); 
    inherited; 
end; 

function TXMLEntryType.Get_Title: UnicodeString; 
begin 
    Result := ChildNodes['title'].Text; 
end; 

procedure TXMLEntryType.Set_Title(Value: UnicodeString); 
begin 
    ChildNodes['title'].NodeValue := Value; 
end; 

function TXMLEntryType.Get_Ref: IXMLRefType; 
begin 
    Result := ChildNodes['ref'] as IXMLRefType; 
end; 

function TXMLEntryType.Get_Author: UnicodeString; 
begin 
    Result := ChildNodes['author'].Text; 
end; 

procedure TXMLEntryType.Set_Author(Value: UnicodeString); 
begin 
    ChildNodes['author'].NodeValue := Value; 
end; 

{ TXMLEntryTypeList } 

function TXMLEntryTypeList.Add: IXMLEntryType; 
begin 
    Result := AddItem(-1) as IXMLEntryType; 
end; 

function TXMLEntryTypeList.Insert(const Index: Integer): IXMLEntryType; 
begin 
    Result := AddItem(Index) as IXMLEntryType; 
end; 

function TXMLEntryTypeList.Get_Item(Index: Integer): IXMLEntryType; 
begin 
    Result := List[Index] as IXMLEntryType; 
end; 

{ TXMLRefType } 

function TXMLRefType.Get_Href: UnicodeString; 
begin 
    Result := AttributeNodes['href'].Text; 
end; 

procedure TXMLRefType.Set_Href(Value: UnicodeString); 
begin 
    SetAttribute('href', Value); 
end; 

end. 

錯誤:近期將QC這一點。

+1

Embarcadero剛剛爲D-XE提供了第一個更新。它似乎已經解決了這個煩人的問題! :-) – 2010-11-12 22:42:36