Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   XML (https://www.delphipraxis.net/46-xml/)
-   -   Delphi XML Komplett auslesen (https://www.delphipraxis.net/99780-xml-komplett-auslesen.html)

marabu 23. Sep 2007 13:26

Re: XML Komplett auslesen
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo Chris,

hier eine kleine Starthilfe:

Delphi-Quellcode:
procedure ExtractAttributes(parent: IXMLNode; s: TStrings; const aName, aValue: string);
var
  sName: string;
  node: IXMLNode;
begin
  node := parent.ChildNodes.First;
  while Assigned(node) do
  begin
    sName := VarToStr(node.Attributes[aName]);
    if sName <> '' then
      s.Values[sName] := VarToStr(node.Attributes[aValue]);
    if node.HasChildNodes then
      ExtractAttributes(node, s, aName, aValue);
    node := node.NextSibling;
  end;
end;
Freundliche Grüße


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:58 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz