AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Projekte himXML (gesprochen himix ML)
Thema durchsuchen
Ansicht
Themen-Optionen

himXML (gesprochen himix ML)

Ein Thema von himitsu · begonnen am 12. Mär 2009 · letzter Beitrag vom 11. Nov 2020
 
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.393 Beiträge
 
Delphi 12 Athens
 
#11

Re: himXML (gesprochen himixML)

  Alt 25. Mai 2009, 23:50
ihr werdet es nicht glauben, aber es gibt nun auch einen SAX-Parser

er benutzt fast die selbe Leseroutine wie TXMLFile, nur daß diese aufgesplittet und etwas modifiziert wurde.

Code:
fill TXMLFile with 3.500.000 nodes, save into and load this from a file
create:0  fill:15852  save:10416  free:2378
create:0  load:24470  free:2237

load a file into TXMLFile with 3.500.000 nodes as virtual SAX mode
create:0  load:32710  free:0

load a file over TSAXParser with 3.500.000 nodes
create:0  load:14488  free:0
er ist auch garnicht so schwer zu nutzen
Delphi-Quellcode:
SAX := TSAXParser.Create(nil);
Try
  SAX.Open('Test.xml');
  While SAX.Read(Node, B) do Begin
    ...
  End;
Finally
  SAX.Free;
End;
Delphi-Quellcode:
TSAXParser = Class
  Procedure Open(Const FileName: TWideString);
  Procedure Open(Stream: TStream; ...);
  Procedure Open(Buffer: Pointer; Len: Integer; ...);
  Property FileName: TWideString;
  Procedure Close;

  Property Options: TXMLOptions;
  Property Version: TWideString;
  Property Encoding: TWideString;
  Property Standalone: TWideString;

  Property Levels: Integer;
  Property Node[Level: Integer]: TSAXNode;

  Function Read(Out Node: TSAXNode; Out isClosedTag: Boolean): Boolean;

  Function Progress: LongInt;
End;

TSAXNode = Class
  Property Level: Integer;

  Property NodeType: TXMLNodeType;

  Property FullPath: TWideString;
  Property Name: TWideString;
  Property Namespace: TWideString;
  Property NameOnly: TWideString;

  Property AttributeCount: Integer;
  Property AttributeName[Index: LongInt]: TWideString;
  Property Attribute[Const IndexOrName: TIndex]: Variant;

  Property isOpenedTag: Boolean;

  Property Data: Variant;
  Property SubNodes: Integer;
End;
wird dann mit'm nächsten Update hochgeladen
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

(?)

LinkBack to this Thread

Erstellt von For Type Datum
xml - MSXML alternative - Stack Overflow This thread Refback 28. Jun 2011 15:34

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:11 Uhr.
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