Article View: borland.public.delphi.xml
Article #124Re: TXMLDocument - Line number of a node?
From: Remy Lebeau (TeamB)
Date: Tue, 29 Jan 2008 18:49
Date: Tue, 29 Jan 2008 18:49
32 lines
2019 bytes
2019 bytes
"Alan Garny" <someone@somewhere.com> wrote in message news:479f0922$1@newsgroups.borland.com... > I was wondering whether there is a way to get the line number > of a node in a TXMLDocument object? No. > My understanding is that a DOM implementation is used to parse > a XML file and represent it as a hierarchy of nodes. Yes. > It would seem that the nodes don't hold any information about > their location in the XML file. Correct. > I can understand it from a design point of view, but not from an > end-user point of view. Indeed, while parsing the XML file, and > therefore nodes, I do various checks and I want to be able to report > any problem that there might be with the XML code. I already do all > of that, except that to help my users even further, I would like to be > able to refer to the line/column of the problem. The only way to get that info is if either the XML parser's own error messages include it, you use a SAX parser that includes it while parsing, or you parse the XML manually. Gambit
Technical Details
Message-ID:
<479f77ee$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<479f0922$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f5d9b,fc655fcac5d0f7c1 X-Google-Attributes: gidf5d9b,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.delphi.xml References: <479f0922$1@newsgroups.borland.com> Subject: Re: TXMLDocument - Line number of a node? Date: Tue, 29 Jan 2008 10:49:58 -0800 Lines: 34 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 207.178.157.90 Message-ID: <479f77ee$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1201633262 207.178.157.90 (29 Jan 2008 11:01:02 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail