<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>13 Oct 2020 14:10:36 Z</lastBuildDate><pubDate>12 Oct 2020 16:35:39 Z</pubDate><description>[code:wl]&#13;
&#13;
NaamXMLBestand   is string	        // Declaratie string voor naam XML bestand&#13;
nBeleningen      is numeric         // Beleningen per relatie&#13;
ImportBelening   is xmlDocument     // &#13;
&#13;
NaamXMLBestand   = CompleteDir(fExeDir()) + "MAILBELENING.XML"&#13;
ImportBelening   = XMLOpen(NaamXMLBestand,fromFile)&#13;
&#13;
RelatieRec       is xmlNode,description = "ImportBelening.GROEPRELATIES.Relatie"&#13;
BeleningRec      is xmlNode,description = "ImportBelening.GROEPRELATIES.Relatie.GROEPBELENINGEN"&#13;
TekstRec         is xmlNode,description = "ImportBelening.GROEPRELATIES.Relatie.Tekst"&#13;
&#13;
	IF ImportBelening..RootNode..Occurrence &lt; 1 THEN&#13;
		Info("Het XML bestand bevat geen inhoud of heeft een verkeerde structuur. " + ErrorInfo())&#13;
	ELSE&#13;
 		FOR EACH RelatieRec OF ImportBelening.GROEPRELATIES&#13;
		  RelatieRecord()&#13;
          nBeleningen = 0&#13;
&#13;
          FOR EACH BeleningRec OF ImportBelening.GROEPRELATIES.Relatie.GROEPBELENINGEN &#13;
              nBeleningen = nBeleningen + 1&#13;
              BeleningRecord()&#13;
          END&#13;
       	  HAdd(MailBelening)&#13;
        END&#13;
	END&#13;
[/code]&#13;
&#13;
Part of the xml file:&#13;
&#13;
&lt;?xml version="1.0" encoding="UTF-8"?&gt;&#13;
&lt;GROEPRELATIES&gt;&#13;
	&lt;Relatie&gt;&#13;
		&lt;Mailadres&gt;chadam@hollendekrakerstier.nl&lt;/Mailadres&gt;&#13;
		&lt;Relatieid&gt;1&lt;/Relatieid&gt;&#13;
		&lt;Naam&gt;Dundee&lt;/Naam&gt;&#13;
		&lt;Voornaam&gt;John&lt;/Voornaam&gt;&#13;
		&lt;Voorletters&gt;J&lt;/Voorletters&gt;&#13;
		&lt;Voorvoegsel/&gt;&#13;
		&lt;Geboortedatum&gt;12/04/1992&lt;/Geboortedatum&gt;&#13;
		&lt;Geboorteplaats/&gt;&#13;
		&lt;Geslacht&gt;M&lt;/Geslacht&gt;&#13;
		&lt;Adres&gt;Highstreet 10&lt;/Adres&gt;&#13;
		&lt;PCWoonplaats&gt;1000AA Amsterdam&lt;/PCWoonplaats&gt;&#13;
		&lt;eMail&gt;dundee@holowkraker.nl&lt;/eMail&gt;&#13;
		&lt;GROEPBELENINGEN&gt;&#13;
			&lt;Belening&gt;&#13;
				&lt;Beleningsnr&gt;B2000014&lt;/Beleningsnr&gt;&#13;
				&lt;Beleensom&gt;500&lt;/Beleensom&gt;&#13;
				&lt;Vervaldatum&gt;18/08/2020&lt;/Vervaldatum&gt;&#13;
				&lt;Beleningsdatum&gt;18/06/2020&lt;/Beleningsdatum&gt;&#13;
			&lt;/Belening&gt;&#13;
			&lt;Belening&gt;&#13;
				&lt;Beleningsnr&gt;B2000027&lt;/Beleningsnr&gt;&#13;
				&lt;Beleensom&gt;51&lt;/Beleensom&gt;&#13;
				&lt;Vervaldatum&gt;26/08/2020&lt;/Vervaldatum&gt;&#13;
				&lt;Beleningsdatum&gt;26/06/2020&lt;/Beleningsdatum&gt;&#13;
			&lt;/Belening&gt;&#13;
		&lt;/GROEPBELENINGEN&gt;&#13;
&#13;
The XML file has many RelatieRec 's. &#13;
Every RelatieRec has one or more BeleningRec as subnodes.&#13;
&#13;
The above structure reads every RelatieRec correct. &#13;
But for every RelatieRec the BeleningRec's of the first RelatieRec are read.&#13;
&#13;
How to read the child nodes 'Belening' of a parent 'Relatie' in this case?&#13;
&#13;
Kind regards, Wim</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent/read.awp</link><title>XML: How to read child nodes of a parent?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>Geoff Spillane</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68046/read.awp</comments><pubDate>13 Oct 2020 14:10:36 Z</pubDate><description>I'm glad you got it to work. :)&#13;
&#13;
Best Regards,&#13;
	Geoff</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68046/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68046/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent/read.awp">XML: How to read child nodes of a parent?</source><title>Re: XML: How to read child nodes of a parent?</title></item><item><author>info</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68045/read.awp</comments><pubDate>13 Oct 2020 11:31:30 Z</pubDate><description>Hi Geoff,&#13;
&#13;
Thank you very much for the time and effort you took for the example!&#13;
&#13;
When I leave out the "ON Relatie and ON GR…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68045/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68045/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent/read.awp">XML: How to read child nodes of a parent?</source><title>Re: XML: How to read child nodes of a parent?</title></item><item><author>Geoff Spillane</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68044/read.awp</comments><pubDate>13 Oct 2020 04:41:15 Z</pubDate><description>Hi Wim,&#13;
&#13;
In "Project Explorer", under "External descriptions", I right-clicked and imported a copy of an appropriate xml file …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68044/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent-68044/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/68043-xml-how-read-child-nodes-parent/read.awp">XML: How to read child nodes of a parent?</source><title>Re: XML: How to read child nodes of a parent?</title></item></channel></rss>
