Thema: XML Attribut

Einzelnen Beitrag anzeigen

value is NULL

Registriert seit: 10. Sep 2010
249 Beiträge
 
#10

AW: XML Attribut

  Alt 15. Mär 2011, 17:06
ich hab jetzt eine Lösung, allerdings ist die nicht wirklich schön:

Delphi-Quellcode:
    while not (acc = nil) do begin
      i := i + 1;
      if (acc.HasAttribute('type')) and (acc.Attributes['type'] = 'ACCMgr') then begin
            debug('FOUND!');
            res := res + i;
            debug('ITEM ID in XML := '+inttostr(i));
      end;
      acc := acc.NextSibling;
    end;

    acc := xml.DocumentElement.ChildNodes.First.ChildNodes.First.ChildNodes.FindNode('module');
    while not (cache = res) do begin
      debug('Adding 1 to cache: '+inttostr(cache));
      cache := cache + 1;
      acc := acc.NextSibling;
    end;
was haltest du davon ?!

LG
  Mit Zitat antworten Zitat