Cant access a encapsulated element

Hello guys i generated with the xml data binding a unit and i want to use it to generate new xml files.

Code:

{code}
var
 XML: IXMLReha;
 newXML: TStringList;
 Entgelte: IXMLReha_rehKV_rehRechnung_recFachliche_Daten_recRechnung_RehaEinrichtung_recEntgelte;
begin
  XML := NewrehReha;

  XML.OwnerDocument.Options := [doNodeAutoCreate, doNodeAutoIndent];
  XML.Logische_Version := '1.6.0';


  {Kopfdaten}       //xmlns:kod


  XML.KV.Kopfdaten.Erstellungsdatum_Uhrzeit             := '2014-09-23T15:33:23';
  XML.KV.Kopfdaten.Version                              := '1.2.0';
  XML.KV.Kopfdaten.Dateinummer                          := 000010;

  XML.KV.Kopfdaten.Identifikationsdaten.IK_Absender     := 108018007;
  XML.KV.Kopfdaten.Identifikationsdaten.IK_Empfaenger   := 510800000;
  XML.KV.Kopfdaten.Identifikationsdaten.IKKostentraeger := 108018007;
  XML.KV.Kopfdaten.Identifikationsdaten.IK_beauftragte_Stelle := 1244;
  XML.KV.Kopfdaten.Identifikationsdaten.IK_Einrichtung  := 510800000;
  XML.KV.Kopfdaten.Identifikationsdaten.Fachabteilung := 232323;

  XML.KV.Kopfdaten.Fall_ID_KV.Vertragskennzeichen := 'Kennzeichen';
  XML.KV.Kopfdaten.Fall_ID_KV.Krankenversichertennummer := '1337';
  Xml.KV.Kopfdaten.Fall_ID_KV.Lebendspende := 'Ja';
  XML.KV.Kopfdaten.Fall_ID_KV.IKKrankenversicherung := 0020;
  XML.KV.Kopfdaten.Fall_ID_Rehaeinrichtung := 'sdsdsdsd';
{code}

The code below works perfectly and generates also a xml file but then i tried to fill an encapsulated element and delphi doenst find it. So i tried to access it over the items.

https://i.imgur.com/6K8HDcd.png

always saying list index error
0
George
4/24/2015 12:14:21 PM
embarcadero.delphi.xml 291 articles. 0 followers. Follow

1 Replies
550 Views

Similar Articles

[PageSpeed] 37

George Smith wrote:

> Hello guys i generated with the xml data binding a unit and i want to
> use it to generate new xml files.
> 
> Code:
> 
> {code}
> var
>  XML: IXMLReha;
>  newXML: TStringList;
>  Entgelte:
> IXMLReha_rehKV_rehRechnung_recFachliche_Daten_recRechnung_RehaEinricht
> ung_recEntgelte; begin   XML := NewrehReha;
> 
>   XML.OwnerDocument.Options := [doNodeAutoCreate, doNodeAutoIndent];
>   XML.Logische_Version := '1.6.0';
> 
> 
>   {Kopfdaten}       //xmlns:kod
> 
> 
>   XML.KV.Kopfdaten.Erstellungsdatum_Uhrzeit             :=
> '2014-09-23T15:33:23';   XML.KV.Kopfdaten.Version
> := '1.2.0';   XML.KV.Kopfdaten.Dateinummer
> := 000010;
> 
>   XML.KV.Kopfdaten.Identifikationsdaten.IK_Absender     := 108018007;
>   XML.KV.Kopfdaten.Identifikationsdaten.IK_Empfaenger   := 510800000;
>   XML.KV.Kopfdaten.Identifikationsdaten.IKKostentraeger := 108018007;
>   XML.KV.Kopfdaten.Identifikationsdaten.IK_beauftragte_Stelle := 1244;
>   XML.KV.Kopfdaten.Identifikationsdaten.IK_Einrichtung  := 510800000;
>   XML.KV.Kopfdaten.Identifikationsdaten.Fachabteilung := 232323;
> 
>   XML.KV.Kopfdaten.Fall_ID_KV.Vertragskennzeichen := 'Kennzeichen';
>   XML.KV.Kopfdaten.Fall_ID_KV.Krankenversichertennummer := '1337';
>   Xml.KV.Kopfdaten.Fall_ID_KV.Lebendspende := 'Ja';
>   XML.KV.Kopfdaten.Fall_ID_KV.IKKrankenversicherung := 0020;
>   XML.KV.Kopfdaten.Fall_ID_Rehaeinrichtung := 'sdsdsdsd';
> {code}
> 
> The code below works perfectly and generates also a xml file but then
> i tried to fill an encapsulated element and delphi doenst find it. So
> i tried to access it over the items.
> 
> https://i.imgur.com/6K8HDcd.png
> 
> always saying list index error

If you have an element in a node that is a node collection (has an
Items property) you have to call the collections Add method first to
add a new element to the collection. The Add call returns this element,
and then you can add data to it using the returned reference.



-- 
Peter Below (TeamB)
0
Peter
4/24/2015 5:42:15 PM
Reply:

Similar Artilces:

Can't access XML elements with XElement
Hi, this is my second attempt to deal with xml files via XDocument and I can't get it to work for some mad reason. I have a bunch of text files that contain parts of XML that I need to manipulate. What I do is I get the file into a string, make sure only the XML bits get in there and then create an XML document: string doc = string.Empty; ... XDocument xdoc = XDocument.Parse(doc); if you preview the xdoc in debug, it will look like the following: <TERMS xmlns="http://www.ashmanov.com/autocontext/3.0/"> <CATEGORIES> <CATEGORY id=Dosug title=some difflim...

Is there a way by using web.config element? to block access to XML files on server.
Context: Basically, XML files are just flat file like a text file. But its contents are easily manipulable because of its 'tag' nature. So like a text file, XML files can be in any folder/directory/drive, however, it can be accessed from the outside world like http://www.yourwebsite.com/forms/XML/form1.xml. So it can be seen by anyone. Question: Is there a way we can put these XML files in a folder/directory/drive and place some kind of security techniques on its access by using web.config element? If so, what is that element? 1M Thanks.Where there is a will, there is a way...

Cant we access "User.Identity,Name" element in Master Page ?
Hi All,I am trying to display the username in the contentplaceholder in the Master Page.  <body> <form id="frmMaster" runat="server"> <div> <asp:ContentPlaceHolder ID="topPanel" runat="server"> <h3 align="center"> <! mySite World !></h3> <asp:Label ID="lblName" runat="server"></asp:Label> <asp:HyperLink ID="lnkIntro" runat="server" NavigateUrl="~/Intro.a...

XML Question using XML::Element
I am fresh to the new glorious World of XML, and trying to figure out how this stuff melds together with perl. I found http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html could somebody look over my code analysis and tell me if I am (nearly) right? require "files/camelid_links.pl"; # Needs the specified file to work. my %camelid_links = get_camelid_data(); # Some function that greates the Hash (see section the Hash). my $root = XML::Element->new('html'); # Creates the HTML Frame <html></html>. my $body = XML::Element->new('body'...

Creating an XML Element from XML string?
Before a form is submitted back to the server I create an XML representation of the current state of a certain ListBox and store it in a hidden field, as it appears that a Listbox when manipulated on the client does not return it's state back to the server correctly.In each item's value property in the listbox there is already stored an XML representation of that item (populated from the Server when the page was created).  The problem I am encountering is how to create an XML element from that XML string stored in the value property.  I know I can parse through the XML string and b...

How to create an XML element inside other elements.
Hello, This thread is a countinuity of this thread where you can find the complete object for download.I am using the following code:  XElement parentElement; if (tvwPhoneBook.SelectedNode != null) { string xPath = tvwPhoneBook.SelectedNode.DataPath .Substring(tvwPhoneBook.Nodes[0].DataPath.Length); parentElement = rootElement.XPathSelectElement(xPath); } else { parentElement = rootElement; } // Get the maximal ID value int maxId = ...

Re: Import xml file in xml Element
Here, I got one question, you might be able to help me.  Is it possible to import xml file in xml element? For example: <store>  <book>     <name>Harry Potter</name>     <version>5</version>     <publish>2007</publish>     <details>c:\actress.xml</details>   </book></store> -- c:\actress.xml <harry> <actor>Daniel Radcliffe</actor> <age>18</age> </harry> <Hermione&...

How do I get XML elements having same name in a XML node
XML Code: <questions> <question> <q>What is your number?</q> <answer>3</answer> <answer>5</answer> <answer>9</answer> </question> <question> <q>In what state did you studied?</q> <answer>Indiana</answer> <answer>Arkansas</answer> <answer>Tennessee</answer> </question> </questions> Code:  XmlDocument doc = new XmlDocument(); doc.Load(XMLFilePath); //PAth to the XML file XmlEl...

Access denied error in xml when client access increased
Hi, In my asp.net web application first time I am selecting some information from database and store it into xml file. Next time if same request comes i will not query to database just i will select from xml file. The problem is when number of client increase the access denied error is firing when reading xml file. How it can be avoided Plz Help Me Thanks in advanceSundar  ...

XML
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi... Here's hoping someone can come to the rescue on this issue for me. I'm having a bear of a time figuring out why XML::Simple seems to want to make both the attribute and child element of a specific element into their own elements. I'm starting to wonder if the XML supplied as input is illegally formatted? As can be seen in my example here, the <platform_specific> element has an attribute named "attribute" and another named "platform". It also has a child element named <plat...

Inserting XML elements and attributes using XML DML
Hi,I'm trying to insert XML data into a SQL Server database XML column by using XML DML inside of a Stored Procedure. Thanks to http://msdn2.microsoft.com/en-us/library/ms175466.aspx I know how to insert new elements and attributes in different steps, but is there a way of combining these (inserting a new element and an attribute at the same time)? I found a solution to that:XMLColumn.modify('insert element Career {attribute lang {sql:variable("@Language")}} as first into (/CareerInformation)[1]')But now I'm trying to insert some values for this node and can't get it done. There's a lot of...

Delphi 7 to Delphi XE: TBlobField to XML [Edit]
Hi, I'm migrating a Delphi7 application to Delphi XE. I'm using a TClientDataSet to communicate, by using a XML frame, with my server. In this TClientDataSet I'm using a TBlobField which is an array of 384 byte. The blobField is allocate by a code like this : {code} myStream : TStream; myStream := aClientDataSet.CreateBlobStream(myBlobField, bmwrite); vResult := myStream.Write(ArrayOf384Byte[0], length(ArrayOf384Byte)); //vResult = 384 => GooD ! (...) {code} For communicate with the server, we have to decode the Blobfield in XML before to sending it. We have...

XML Object Serialization - ArrayList
Hi guys, I have written code in order to perform XML Object Serialization.  What is being generated is as follows:  1 <ArticleSet> 2 <Article> 3 <AuthorList> 4 <Author> 5 <FirstName>M</FirstName> 6 <MiddleName>H</MiddleName> 7 <LastName>Y</LastName> 8 <Affiliation>Affiliation</Affiliation> 9 </Author> 10 <Author> 11 <FirstName>L</FirstName> 12 <MiddleName>J</Midd...

Delphi access
What is the best access method from Delphi? (Actually I use ODBC) NativeDB (nativedb.com). Native, super-fast, robust, easy to use, tech-support second-to-none. Best tool, period. If you're insisting on using ODBC, I don't have an advice, please await further responses. P.S. Disclosure: I'm not a salesperson nor affiliated w/ NativeDB; just one of the many v. satisfied customers. Cosmin <billyocean> wrote in message news:E6D82D759521505300458A3285256BE2.00458A3F85256BE2@webforums... > What is the best access method from Delphi? > > (Actuall...

Web resources about - Cant access a encapsulated element - embarcadero.delphi.xml

Encapsulated PostScript - Wikipedia, the free encyclopedia
Encapsulated PostScript , or EPS , is a DSC -conforming PostScript document with additional restrictions which is intended to be usable as a ...

"The body is first encapsulated into a fetal position in order to fit inside of the burial pod."
"The pod looks like an earthy piece of art, but really it’s a biodegradable 'casket.' Once the burial pod is buried deep underground a tree seed ...

Encapsulated PostScript Archives - Cult of Mac
Are you a designer? Do you want to become a designer? Have you ever thought about bringing out the creative in you? Now is a great opportunity ...

The Dennis Erickson Era At Arizona State, Encapsulated In One Play
Arizona State fired head football coach Dennis Erickson almost a month ago, but allowed him to coach the team through the end of the season—including ...

Potential encapsulated
Take it or it will call your motherProteus Biomed NOVARTIS, a Swiss pharmaceuticals giant, is involved in two deals at the moment. Its $50 billion ...

The "What is the Sexiest Thing Someone Has Ever Said to You?" Reddit Thread is Reddit Perfectly Encapsulated ...
So, there's a Reddit thread today titled, "What is the sexiest thing someone has ever said to you?" and it's exactly as hilarious as you would ...

Apple's Made in California ad inadvertently encapsulated everything wrong with how the tech industry
Apple's Made in California ad inadvertently encapsulated everything wrong with how the tech industry "designs" a product into people's lives ...

Beijing’s Encapsulated ‘Parkview Green FangCaoDi’ Has Its Own Energy Efficient Microclimate
Read the rest of Beijing’s Encapsulated ‘Parkview Green FangCaoDi’ Has Its Own Energy Efficient Microclimate Permalink - Add to del.icio.us ...

Soul Sacrifice review: Escapism encapsulated
Soul Sacrifice is a steady ascent to superiority over your captor, a mad sorcerer named Magusar. You can provoke and challenge him from within ...

Open thread: Obama era perfectly encapsulated in one sentence; Krauthammer nukes Hillary apologists
**Written by Doug Powers How about another Sunday open thread? This week’s mish-mosh of what’s-going-on is brought to you in part by Omaha Steaks, ...

Resources last updated: 1/11/2016 10:22:15 PM