Board index » delphi » Does the XML Data Binding Wizard always work with no problems ?

Does the XML Data Binding Wizard always work with no problems ?


2008-06-18 06:19:40 PM
delphi193
Hello,
Just found the XML Data Binding Wizard and it looks really good. However
the code it generates does not compile. the XSD file I gave it is well
formed and valid. But given I am new at XML maybe its not defined correctly
for the wizard.
Here are two example that the wizard generated for me:
Example 1
{ Forward Decls }
IXMLProcessType = interface;
IXMLProcess = interface;
IXMLProcessList = interface;
IXMLDisplay = interface;
IXMLConditionalType = interface;
IXMLImbeddedProcessType = interface;
IXMLHistoryType = interface;
IXMLTimestampType = interface;
IXMLTimestampTypeList = interface;
IXMLProcessFlowType = interface;
IXMLScheduleType = interface;
IXMLVars = interface;
IXMLVarType = interface;
IXMLSubTasks = interface;
IXMLTaskType = interface;
IXMLTaskTypeList = interface;
IXMLDisplay = interface; { IXMLDisplay is re-declared and causes
compiler error}
IXMLCompleted = interface;
IXMLVariable = interface;
IXMLVariableList = interface;
IXMLImbeddedProcess = interface;
IXMLImbeddedProcessList = interface;
IXMLInheritedProcessType = interface;
IXMLInheritedProcessTypeList = interface;
IXMLDisplay = interface; { IXMLDisplay is re-declared and causes
compiler error}
IXMLVariable = interface; { IXMLVariable is re-declared and causes
compiler error}
IXMLVarName = interface;
IXMLVarValue = interface;
Example 2
{ Global Functions }
function GetProcess(Doc: IXMLDocument): IXMLProcess;
function LoadProcess(const FileName: WideString): IXMLProcess;
function NewProcess: IXMLProcess;
function GetProcess(Doc: IXMLDocument): IXMLProcessList;
{function re-declared 3 lines above}
function LoadProcess(const FileName: WideString): IXMLProcessList;
{function re-declared 3 lines above}
function NewProcess: IXMLProcessList;
{function re-declared 3 lines above}
Can any one suggest A reason why I am getting this ?
Regards, Maz
 
 

Re:Does the XML Data Binding Wizard always work with no problems ?

"Maz Alf" <XXXX@XXXXX.COM>writes
Quote
Hello,

Just found the XML Data Binding Wizard and it looks really good. However
the code it generates does not compile. the XSD file I gave it is well
formed and valid. But given I am new at XML maybe its not defined
correctly for the wizard.
Where is the schema coming from (XSD, DTD)? Can you post an example
(borland.public.attachments)?
krf
 

Re:Does the XML Data Binding Wizard always work with no problems ?

"Kevin Frevert" <XXXX@XXXXX.COM>writes
Quote
Where is the schema coming from (XSD, DTD)? Can you post an example
Its an XSD approx 320 lines. I can post it all
Regards, Maz
 

Re:Does the XML Data Binding Wizard always work with no problems ?

You can post it to borland.public.attachments
I suspect you have duplicate schema definitions (ex two or more defined
'Display' nodes) The import is rather simplistic and doesn't 'check' for
those types of things (which is perfectly 'legal' schema-wise)
Have you tried Microsoft's XSD.exe? It generates C# code, but you get an
idea if it has the same issue. If so and if possible, you may have to tweak
the XSD.
Good luck,
krf
"Maz Alf" <XXXX@XXXXX.COM>writes
Quote

"Kevin Frevert" <XXXX@XXXXX.COM>writes
news:XXXX@XXXXX.COM...

>Where is the schema coming from (XSD, DTD)? Can you post an example


Its an XSD approx 320 lines. I can post it all

Regards, Maz