XML Data Binding wizard generated classes

Hi there,

I'm suing a xml schema ( pain.008.001.02.xsd ) directly downloded from it's offical site:  
http://www.iso20022.org/message_archive.page  
but the genereted code from xml data binding wizar is generating a few error's  i've been ablle to pass trought like interpreting lists that are not lists...
However there a complex one "<InstdAmt>" that i've no idea how to solve. I already tried almost everything but it never perform's has it should.
The generted sources/classes are returning this: <InstdAmt Ccy="USD"/> when it should retun <InstdAmt Ccy="USD">1125.52</InstdAmt>.
Please help
Best regards
Mário
0
Utf
4/19/2015 4:16:47 PM
embarcadero.delphi.xml 291 articles. 0 followers. Follow

5 Replies
1067 Views

Similar Articles

[PageSpeed] 5

Mário Reis wrote:

> Hi there,
> 
> I'm suing a xml schema ( pain.008.001.02.xsd ) directly downloded
> from it's offical site:  http://www.iso20022.org/message_archive.page
> but the genereted code from xml data binding wizar is generating a
> few error's  i've been ablle to pass trought like interpreting lists
> that are not lists...  However there a complex one "<InstdAmt>" that
> i've no idea how to solve. I already tried almost everything but it
> never perform's has it should.  The generted sources/classes are
> returning this: <InstdAmt Ccy="USD"/> when it should retun <InstdAmt
> Ccy="USD">1125.52</InstdAmt>.  Please help Best regards Mário

Insufficient data, sorry.

Are you trying to fix the generated code? Before you do that, go back
to the XML databinding wizard and closely examine how it decided to
represent the elements found in the XML schema. I have made the
experience that it sometimes picks the wrong Delphi data types for
elements that contain data instead of other elements. You then have to
manually change the data type to the one it should be *before* you go
to the next wizard step and let it generate the code unit.

-- 
Peter Below (TeamB)
0
Peter
4/21/2015 4:51:14 PM
> {quote:title=Peter Below wrote:}{quote}
> Mário Reis wrote:
>   Well! After generating the code i'm trying to build my xml file:
     // Moeda
   Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy := 'USD'// Moeda and i don't have wher to assign(i don't know) or where to load money value?! I tryied '"USD"1123.59'; but it doesn't work at all. The <InsdAmt> tag shoild apear like this: <InstdAmt Ccy="USD">1110.00</InstdAmt> but apears just like this <InstdAmt Ccy="USD" not even close the tag It'is lost for ever?!!!
If instad of assignig Ccy:='USD' or 'EUR' i assign ti to the value  Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='11251.99' it returns <InstdAmt Ccy="11251.99"/>This bad!
I bought the XE Enterprise version to have among others this tool but it doesn't perform as it should from D7 til DXE7 this bad for Embarcadero!

Is there some special way of doing it; how should i assing the value in this cases, because this is the only variable to carrie values" Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :=???"

 Best regards
Mário


> > Hi there,
> > 
> > I'm suing a xml schema ( pain.008.001.02.xsd ) directly downloded
> > from it's offical site:  http://www.iso20022.org/message_archive.page
> > but the genereted code from xml data binding wizar is generating a
> > few error's  i've been ablle to pass trought like interpreting lists
> > that are not lists...  However there a complex one "<InstdAmt>" that
> > i've no idea how to solve. I already tried almost everything but it
> > never perform's has it should.  The generted sources/classes are
> > returning this: <InstdAmt Ccy="USD"/> when it should retun <InstdAmt
> > Ccy="USD">1125.52</InstdAmt>.  Please help Best regards Mário
> 
> Insufficient data, sorry.
> 
> Are you trying to fix the generated code? Before you do that, go back
> to the XML databinding wizard and closely examine how it decided to
> represent the elements found in the XML schema. I have made the
> experience that it sometimes picks the wrong Delphi data types for
> elements that contain data instead of other elements. You then have to
> manually change the data type to the one it should be *before* you go
> to the next wizard step and let it generate the code unit.
> 
> -- 
> Peter Below (TeamB)
0
Utf
4/22/2015 3:36:47 PM
Mário Reis wrote:

> > {quote:title=Peter Below wrote:}{quote}
> > Mário Reis wrote:
> >   Well! After generating the code i'm trying to build my xml file:
>      // Moeda
>    Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy := 'USD'// Moeda
> and i don't have wher to assign(i don't know) or where to load money
> value?! I tryied '"USD"1123.59'; but it doesn't work at all. The
> <InsdAmt> tag shoild apear like this: <InstdAmt
> Ccy="USD">1110.00</InstdAmt> but apears just like this <InstdAmt
> Ccy="USD" not even close the tag It'is lost for ever?!!!  If instad
> of assignig Ccy:='USD' or 'EUR' i assign ti to the value
> Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='11251.99' it
> returns <InstdAmt Ccy="11251.99"/>This bad!  

Have you tried this? :

Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Nodevalue :=11251.99;
Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='USD';

You are assigning to Ccy, which is obviously an attribute of CdtrAcct,
not its value!

Whoever decided on these element names needs to be taken out and shot,
by the way <g>.


-- 
Peter Below (TeamB)
0
Peter
4/22/2015 6:26:27 PM
> {quote:title=Peter Below wrote:}{quote}
> Mário Reis wrote:
>   Well! After generating the code i'm trying to build my xml file:
     // Moeda
   Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy := 'USD'// Moeda and i don't have wher to assign(i don't know) or where to load money value?! I tryied '"USD"1123.59'; but it doesn't work at all. The <InsdAmt> tag shoild apear like this: <InstdAmt Ccy="USD">1110.00</InstdAmt> but apears just like this <InstdAmt Ccy="USD" not even close the tag It'is lost for ever?!!!
If instad of assignig Ccy:='USD' or 'EUR' i assign ti to the value  Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='11251.99' it returns <InstdAmt Ccy="11251.99"/>This is bad!
I bought the XE Enterprise version to have among others this tool but it doesn't perform as it should from D7 til DXE7 this bad for Embarcadero! There is not fix for this?

Is there some special way of doing it; how should i assing the value in this cases, because this is the only variable to carrie values" Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :=???"

 Best regards
Mário


> > Hi there,
> > 
> > I'm suing a xml schema ( pain.008.001.02.xsd ) directly downloded
> > from it's offical site:  http://www.iso20022.org/message_archive.page
> > but the genereted code from xml data binding wizar is generating a
> > few error's  i've been ablle to pass trought like interpreting lists
> > that are not lists...  However there a complex one "<InstdAmt>" that
> > i've no idea how to solve. I already tried almost everything but it
> > never perform's has it should.  The generted sources/classes are
> > returning this: <InstdAmt Ccy="USD"/> when it should retun <InstdAmt
> > Ccy="USD">1125.52</InstdAmt>.  Please help Best regards Mário
> 
> Insufficient data, sorry.
> 
> Are you trying to fix the generated code? Before you do that, go back
> to the XML databinding wizard and closely examine how it decided to
> represent the elements found in the XML schema. I have made the
> experience that it sometimes picks the wrong Delphi data types for
> elements that contain data instead of other elements. You then have to
> manually change the data type to the one it should be *before* you go
> to the next wizard step and let it generate the code unit.
> 
> -- 
> Peter Below (TeamB)
0
Utf
4/22/2015 9:06:15 PM
> {quote:title=Peter Below wrote:}{quote}
> Mário Reis wrote:
> 
   Dear Peter,

   Now it's working fine. By mistake i first posted the wrong tags. The tag i wanted to refer to was:

     // 2.44 It's jut a question of working it. By default it's a decimal max=18 dec=5 min=0

    my_val='11251.99'; //Variant  in order to maintain the dot '.' otherWise it replaces the dot by a comma

   Document1.CstmrDrctDbtInitn.PmtInf.DrctDbtTxInf.InstdAmt.NodeValue := my_val ;
   Document1.CstmrDrctDbtInitn.PmtInf.DrctDbtTxInf.InstdAmt.Ccy :='USD' ;

  Now-> result:= <InstdAmt Ccy="USD">11251.99</InstdAmt> or <InstdAmt Ccy="EUR">11251.99</InstdAmt> as it should. 

  Thank you very much.

  Best regards
  Mário Reis 

 PS-  This is the first time i'm using the Xml classes. Before i used :  myLine:='<InstdAmt Ccy="EUR">'+ myValue+'</InstdAmt>'+CRLF;
        And later on  WriteLn(myTxtFile, myLine); etc...

  


> > > {quote:title=Peter Below wrote:}{quote}
> > > Mário Reis wrote:
> > >   Well! After generating the code i'm trying to build my xml file:
> >      // Moeda
> >    Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy := 'USD'// Moeda
> > and i don't have wher to assign(i don't know) or where to load money
> > value?! I tryied '"USD"1123.59'; but it doesn't work at all. The
> > <InsdAmt> tag shoild apear like this: <InstdAmt
> > Ccy="USD">1110.00</InstdAmt> but apears just like this <InstdAmt
> > Ccy="USD" not even close the tag It'is lost for ever?!!!  If instad
> > of assignig Ccy:='USD' or 'EUR' i assign ti to the value
> > Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='11251.99' it
> > returns <InstdAmt Ccy="11251.99"/>This bad!  
> 
> Have you tried this? :
> 
> Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Nodevalue :=11251.99;
> Document1.CstmrDrctDbtInitn.PmtInf.CdtrAcct.Ccy :='USD';
> 
> You are assigning to Ccy, which is obviously an attribute of CdtrAcct,
> not its value!
> 
> Whoever decided on these element names needs to be taken out and shot,
> by the way <g>.
> 
> 
> -- 
> Peter Below (TeamB)
0
Utf
4/22/2015 10:02:38 PM
Reply:

Similar Artilces:

Have Delphi 2010 Pro, XML Data Binding Wizard not in File | New | Other
What version of Delphi 2010 is required to have the XML Data Binding Wizard show up in File | New | Other? Or what modules need to be installed? I have Delphi 2010 Professional and I've seen other threads in this forum that say that version includes it but it's not in my New Items dialog. Thanks. "Tempus Software Development" wrote in message news:274910@forums.embarcadero.com... > What version of Delphi 2010 is required to have the XML Data Binding > Wizard show up in File | New | Other? Or what modules need to be > installed? > > I have Delph...

"The system cannot find the path specified" using delphi xml data binding wizard
I am trying to create a binding for an xml file. As far as I can tell it is in the correct encoding and does not refer to any other files. It displays quite happily in IE8, EditPad Pro and the JVSimpleXML. Trying to create the binding I get the above error message with "Line:0". I have had the same message with other files, including xsd files. If I try to open the file from the explorer (or Explorer2 which I use by preference), I get a message "Windows cannot find the file...." before it displays in EditPad Pro. I am running Vista and wonder if it is a...

Delphi 2006 xml data binding wizard supports import from external XSD's
Hi, Does Delphi 2006 xml data binding wizard supports dynamic import from external XSD's? When generating I get "Unknown datatype "common:Represantative_Type". (See type="common:Representative_Type" minOccurs="0">). Represantative_Type can be found in IntervatInputCommon_v0_7.xsd which has to b imported dynamically on generation. As a test i removed '<xs:import namespace="http://www.minfin.fgov.be/InputCommon" schemaLocation="IntervatInputCommon_v0_7.xsd"/>' line and add all the missing types from IntervatInp utCom...

reading data in xml file with data binding wizard
I am trying to read the data in a xml response file - I built a interface file from the xml data file using the xml data binding wiziard. How do I use this file to actualy LOAD the datafile and READ the values I do not need to add nodes or change anything I am just trying to access the data file name itemsearch.pas created trying to get to childnodes <Item> from the xml file myfile.xml tried something like this var myIXMLItemSearchResponseType: IXMLItemSearchResponseType; myItem: IXMLItemType; myIXMLItemSearchResponseType := itemsearch.LoadItemSearchResponse(&#...

XML Data Binding Wizard [Edit]
I tried to use "XML Data Binding Wizard" in DELPHI 2007 and XE2 from a XSD file, I got error message as "Invalid or unsupported XML schema document". The xsd file is fetched from one of official web service site and I am sure it is correct. So I think if the XML data binding wizard in XE2 or D2007 can handle with all xsd file or has any limitation? I attached xsd file here, could anyone give me some tips? Edited by: Hailin Chen on Jan 9, 2014 8:22 AM Checked and tested further by myself. Found the file was a wsdl file and should use WSDL importer. It is my fault. ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

Usage of XML data binding wizard
Hello, I'm a bit of a newbie when it comes to Delphi and XML. 4 or 5 years ago I managed to import and use MSXML4 by referencing MSXML2_TLB. I've just discovered the XML Data Binding Wizard which seem to work very well for my small XML file. The problem I have is MSXML2_TLB supported XPATH but it seems the code generated by the wizard does not. (Iassume because its using a different XMLDOM implementation, yes?). If this is the case can I can the wizard to generate code for use with MSXML2_TLB so that I get XPATH. Does that make sense ? (If I'm using the wrong terms p...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XML data binding wizard, documentation?
Hello all, I have several large XSD files to import in Delphi. These XSD files carry a lot of remarks/documentation. Unfortunately these all get lost when I import them into Delphi. It's so silly, really. Is there a way to make the XML data binding wizard retain these remarks and put them into the Delphi sourcecode it generates? -- Arthur Hoornweg (In order to reply per e-mail, please just remove the ".net" from my e-mail address. Leave the rest of the address intact including the "antispam" part. I had to take this measure to countera...

XML Data Binding Wizard [Edit]
I would like to use the XML Data Binding Wizard, but it does not show up in the File > New > Other menu command. How do I access it? I'm using Delphi XE2 Enterprise. Doug wrote: > I would like to use the XML Data Binding Wizard, but it does not show > up in the File > New > Other menu command. Then you likely did not select it when you installed the IDE. -- Remy Lebeau (TeamB) What installation option is it? > {quote:title=Remy Lebeau (TeamB) wrote:}{quote} > Doug wrote: > > > I would like to use the XML Data Binding Wizard, but it doe...

Any limitation in XML Data Binding Wizard?
I tried to use "XML Data Binding Wizard" in DELPHI 2007 and XE2 from a XSD file, I got error message as "Invalid or unsupported XML schema document". The xsd file is fetched from one of official web service site and I am sure it is correct. So I think if the XML data binding wizard in XE2 or D2007 can handle with all xsd file or has any limitation? Don't know how to attach file into this thread, otherwise I can attach the xsd file here. > Don't know how to attach file into this thread, otherwise I can attach the xsd file here. There is a special "Atta...

XML Data Binding Wizard and Schema Files
Hello! I've just tried to create an XML Data Binding from an XSD file with C++Builder XE. It appears that the XSD file got treated as a regular XML file so that I ended up with a binding for the XSD file rather than a binding for the XML file the schema defines. Using an appropriate DTD file results in the correct binding. Is that a bug? I could not find anything on QC. Christian Hello, Christian Gudrian wrote: > Is that a bug? I could not find anything on QC. C++Builder 2010 uses the *.xsd file as desired, so it's not only an ordinary bug, it's ...

XML Data Binding Wizard
Has anyone any idea how to get the Data Binding Wizard to recognise 12.34 as a decimal/float or double rather than a string? ...

XML Data Binding in Delphi 2010 Professional?
I have Delphi 2010 Pro, and I have access to the XML Data Binding wizard. I tested it against an XML file and it worked great. So my question is: Has this feature been officially moved to the Professional SKU? I'm wondering if this was an oversight and it might be removed from Professional in a future update. The feature matrix indicates that it's Enterprise only. Thanks, Troy > {quote:title=Troy Wolbrink wrote:}{quote} > I have Delphi 2010 Pro, and I have access to the XML Data Binding wizard. I tested it against an XML file and it worked great. So my question is: ...

Web resources about - XML Data Binding wizard generated classes - embarcadero.delphi.xml

Generated collection - Wikipedia, the free encyclopedia
In diatonic set theory , a generated collection is a collection or scale formed by repeatedly adding a constant interval in integer notation ...

Moontoast, VideoGenie Team Up To Bring Brand Advocates’ User-Generated Videos To Facebook
It’s not quite the Facebook video ads that have been the subject of rumors, but social rich media advertising platform Moontoast and user-generated-video ...

Auto-generated message: (someones name) has left this conversation and will no longer see your messages ...
Well I figured out how to stop it for me, do not leave the conversation, instead open the conversation and go to the Actions tab, click "Report ...

User Generated Photos in Open Graph - Facebook-Entwickler
... With the increasing number of users having access to mobile cameras, there is a growing need to be able to share and associate those user-generated ...

Does Hyperlapse signal a bigger shift to user-generated content?
... of the level of seriousness Facebook and Instagram as a whole are taking with video creation. There’s a battle being played out on user-generated ...

Minecraft Command Block : Randomly Generated Forest - YouTube
In this video, I demonstrate what can be done by using the spreadplayers command. Keep in mind, this is just a proof of concept, and hopefully ...

Prayers for man who generated love
JOHN McCARTHY'S farewell had been billed as a football funeral. It was attended by a who's who of the game he loved, yet as a tribute it laid ...

Ex-Miss Universe Jennifer Hawkins makes way for data-generated Miss Fantasy, Eva
Former Miss Universe Jennifer Hawkins probably wasn't counting on the ignominy of being sidelined at Myer for a data-generated fantasy woman ...

CGI - Computer Generated Effects In Movies
CGI has revolutionised filmmaking in the past decade, affecting just about every movie we watch.

Chile earthquake live: Tsunami generated after shallow 8.2 magnitude quake hits in Pacific
Parts of Chile's coastline have been hit by a tsunami after a huge magnitude 8.2 earthquake in the Pacific Ocean.

Resources last updated: 1/13/2016 11:37:06 AM