Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 235457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:15:59+00:00 2026-05-11T20:15:59+00:00

The Delphi 2009 XML Data Binding Wizard fails to process a simple XSD which

  • 0

The Delphi 2009 XML Data Binding Wizard fails to process a simple XSD which contains a complexContent declaration (Invalid Pointer Operation).

Is it a bug or a know limitation?

Example:

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema targetNamespace="http://example.org/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">

  <xsd:complexType name="TestType">
    <xsd:complexContent>
      <xsd:restriction base="xsd:anyType">
        <xsd:attribute name="Name" type="xsd:string"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

</xsd:schema>

Edit: other examples work fine, so it looks like a part of the complexContent definition causes the error. Working example:

<xsd:complexType name="pc-Typ">
  <xsd:sequence>
    <xsd:element name="name"       type="xsd:string"/>
  </xsd:sequence>
  <xsd:attribute name="id" type="xsd:integer"/>
</xsd:complexType>

<xsd:complexType name="myPC-Typ">
  <xsd:complexContent>
    <xsd:extension base="pc-Typ">
      <xsd:sequence>
        <xsd:element name="ram" type="xsd:integer"/>
      </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:15:59+00:00Added an answer on May 11, 2026 at 8:15 pm

    Can I use xsd:complexContent with the Delphi XML Binding Wizard?

    Yes, xsd:complexContent can be used.

    I know Delphi has its flaws, but I don’t blame Delphi for this schema. XSD is a rich schema language, and so is Delphi’s OO class. Parts of two worlds overlap, but there are parts that won’t. XML databinding is an act of translating an XML schema into OO class structure, so the schema has to be concrete enough to be expressed as class.

    In this example, you are saying that TestType matches any type so long as it has a string attribute called Name. An XML validator may be ok with that kind of definition, but it’s hard to define that in a single-inheritance model, since foo:Animal, foo:Plant, and foo:Mineral may all have Name attribute.

    I defined an empty complexType called TestBaseType and that generated class perfectly fine.

    <?xml version="1.0" encoding="utf-8"?>
    <xsd:schema targetNamespace="http://example.org/"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        elementFormDefault="qualified">
    
      <xsd:complexType name="TestBaseType">
        <xsd:sequence>
        </xsd:sequence>
      </xsd:complexType>
    
      <xsd:complexType name="TestType">
        <xsd:complexContent>
          <xsd:restriction base="TestBaseType">
            <xsd:attribute name="Name" type="xsd:string"/>
          </xsd:restriction>
        </xsd:complexContent>
      </xsd:complexType>
    </xsd:schema>
    

    This generated the following code:

    unit test;
    
    interface
    
    uses xmldom, XMLDoc, XMLIntf;
    
    type
    
    { Forward Decls }
    
      IXMLTestBaseType = interface;
      IXMLTestType = interface;
    
    { IXMLTestBaseType }
    
      IXMLTestBaseType = interface(IXMLNode)
        ['{0FBC1D84-DA5E-4315-83A9-B5FFE9528969}']
      end;
    
    { IXMLTestType }
    
      IXMLTestType = interface(IXMLTestBaseType)
        ['{12E35067-516F-4457-8C62-4131CA60D706}']
        { Property Accessors }
        function Get_Name: WideString;
        procedure Set_Name(Value: WideString);
        { Methods & Properties }
        property Name: WideString read Get_Name write Set_Name;
      end;
    
    { Forward Decls }
    
      TXMLTestBaseType = class;
      TXMLTestType = class;
    
    { TXMLTestBaseType }
    
      TXMLTestBaseType = class(TXMLNode, IXMLTestBaseType)
      protected
        { IXMLTestBaseType }
      end;
    
    { TXMLTestType }
    
      TXMLTestType = class(TXMLTestBaseType, IXMLTestType)
      protected
        { IXMLTestType }
        function Get_Name: WideString;
        procedure Set_Name(Value: WideString);
      end;
    
    implementation
    
    { TXMLTestBaseType }
    
    { TXMLTestType }
    
    function TXMLTestType.Get_Name: WideString;
    begin
      Result := AttributeNodes['Name'].Text;
    end;
    
    procedure TXMLTestType.Set_Name(Value: WideString);
    begin
      SetAttribute('Name', Value);
    end;
    
    end.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 132k
  • Answers 132k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer >>> a = [1,2,3,4,5] >>> a.append(a.pop(0)) >>> a [2, 3,… May 12, 2026 at 6:31 am
  • Editorial Team
    Editorial Team added an answer if you really need to map those addresses to your… May 12, 2026 at 6:31 am
  • Editorial Team
    Editorial Team added an answer I would do most of the work in your application… May 12, 2026 at 6:31 am

Related Questions

I`m using Delphi 2009 and want to operate some XML data. I heard that
I installed both the Delphi 2009 trial and actual release via the web installer
I'm checking out the Delphi 2009 Trial, but run into problems with the generics
One of Delphi 2009's advertised features was PNG support. That's great, because the Unicode

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.