Re: archival of newsfeeds?
- From: "cody" <deutronium@xxxxxx>
- Date: Sat, 30 Jul 2005 16:03:54 +0200
But the problem when I use xml files is that if I want to modifiy them, I
have to rewrite the entire file, right?
"Pascal Schmitt" <newsgroup@xxxxxxxx> schrieb im Newsbeitrag
news:uF8vy7IlFHA.576@xxxxxxxxxxxxxxxxxxxxxxx
> Hello!
>
>>> For best comfort, use the XPathDocument wich allows you to use XPath on
>>> streamed xml (eg. it is not loaded into memory) for even more
>>> Performance but more specific and schema-centric code use
>>> Xml(Text)Reader.
>>
>> But if I want to search within my feed is XmlDocument the right solution
>> or
>> is there a better way?
>
> XPathDocument. If there is no need to modify anything, use it!
> (and IF you need to modify a big XML file consider using XmlTextReader &
> XmlTextWriter simultaneously: read data, modify it, write it at once - not
> as nice too look at as DOM operations but really fast.)
>
> XPathDocument x = new XPathDocument("file.xml");
> int f = (int)(double)x.CreateNavigator().Evaluate("count(//foo)");
>
>
>> How fast is XPath? Does it simply walk through all nodes or are there
>> optimized algorithms used, for example hashing?
>
> Afaik there is no need for optimisation because XPath just walks the
> Document using an XPathNavigator (wich both XPathDocument and XmlDocument
> implement but XPathDocument is faster but does not allow editing data
> until .NET 2.0).
>
>
> --
> Pascal Schmitt
.
- References:
- Re: archival of newsfeeds?
- From: Pascal Schmitt
- Re: archival of newsfeeds?
- Prev by Date: Re: Are you the XML expert I need?
- Next by Date: Re: What am I doing in XML?
- Previous by thread: Re: archival of newsfeeds?
- Next by thread: Re: Are you the XML expert I need?
- Index(es):
Relevant Pages
|