AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein XML Delphi IXMLNode.NextSilbing() und angebliche Exception
Thema durchsuchen
Ansicht
Themen-Optionen

IXMLNode.NextSilbing() und angebliche Exception

Ein Thema von Der schöne Günther · begonnen am 20. Jan 2014 · letzter Beitrag vom 20. Jan 2014
 
Der schöne Günther

Registriert seit: 6. Mär 2013
6.199 Beiträge
 
Delphi 10 Seattle Enterprise
 
#1

IXMLNode.NextSilbing() und angebliche Exception

  Alt 20. Jan 2014, 17:11
Ich habe weiterhin Hoffnung dass die Dokumentation nicht voller Fehler ist, sondern ich sie falsch verstehe. Die Dokumentation zu IXMLNodeList.NextSilbing() spricht:
Zitat:
NextSibling returns the node that follows this one in the parent node's ChildNodes property list.

If this node is the last node in its parent's child list, NextSibling raises an exception.
Das ist tatsächlich aber überhaupt nicht der Fall: Es kommt, wie es auch vernünftig wäre, nil heraus und gut ist. Zur Sicherheit noch der entsprechende Quelltext der Klassen:

Delphi-Quellcode:
function TXMLNode.NextSibling: IXMLNode;
begin
  if Assigned(ParentNode) then
    Result := ParentNode.ChildNodes.FindSibling(Self as IXMLNode, 1) else
    Result := nil;
end;
und

Delphi-Quellcode:
function TXMLNodeList.FindSibling(const Node: IXMLNode; Delta: Integer): IXMLNode;
var
  Index: Integer;
begin
  Index := IndexOf(Node);
  Index := Index + Delta;
  if (Index >= 0) and (Index < list.Count) then
    Result := Get(Index) else
    Result := nil;
end;
Warum redet die Hilfe hier von einer Exception? Ich verstehe das nicht. Auch in der Microsoft-Dokumentation zu MSXML steht davon nichts.
  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:

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