Yes I read this tutorial, but I dont know how prepare part "for" to my problem
That is because afaik you can't.
Or to be more specific: not with TXMLDocument/TDomNode. (*)
The internal structure is stored in such a format that 'items' can be accessed by their siblings, children, parent etc.
Ergo, many ways can lead to Rome. This small snippet (to hopefully get you started) is just one of them:
// Read in xml file from disk
ReadXMLFile(Doc, 'test.data.xml');
// Retrieve the 'first' construction node
ThisNode := Doc.DocumentElement.FindNode('construction_item');
while Assigned(ThisNode) do
begin
// process individual children, one for each item in your xml construction structure -> To be inserted by you
// next sibling of construction_item
ThisNode := ThisNode.NextSibling;
end;
edit: (*) I just noticed the GetChildNodes list. I'll have a look at that.
edit 2: Ah, the list is just as awkward to use so in my opinion it doesn't change much to the code (snippet again):
// Read in xml file from disk
ReadXMLFile(Doc, 'test.data.xml');
NodeList := Doc.DocumentElement.ChildNodes;
if Assigned(NodeList) then
begin
for i := 0 to NodeList.Count-1 do
begin
if NodeList.Item[i].NodeName = 'construction_item' then
begin
// process individual children, one for each item in your xml construction structure -> To be inserted by you
end;
end;
end;