Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- ...
- OfficeNode: IXMLNode;
- begin
- ...
- // find the "despachos" subnode of the currently iterated "processo" node
- OfficeNode := ProcessNodes[I].ChildNodes.FindNode('despachos');
- // if there is "despachos" subnode, then...
- if Assigned(OfficeNode) then
- begin
- // go yet one level deeper (I'm reusing the OfficeNode variable here)
- OfficeNode := OfficeNode.ChildNodes.FindNode('despacho');
- // if the "despacho" subnode was found in "despachos", then...
- if Assigned(OfficeNode) then
- begin
- // get the "codigo" attribute value
- AttribNode := OfficeNode.AttributeNodes.FindNode('codigo');
- if Assigned(AttribNode) then
- ShowMessage(AttribNode.Text);
- end;
- end;
- ...
- end;
Advertisement
Add Comment
Please, Sign In to add comment