Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XDocument Exclusive Access [Thread Next] Re: XDocument Exclusive AccessTo: NULL Date: 10/7/2008 8:25:00 AM
thanks alex. this actually worked like a charm. it's early, and i'm not
awake yet.
"Alex Meleta" <ameleta@g...> wrote in message
news:df84a49fd0ce8caf69c4256c590@n......
> Hi Tom,
>
> For example like this XDocument.Load(new XmlTextReader(new FileStream
> .....
>
> ps. mind 'using' statement
>
> Regards, Alex Meleta
> [TechBlog] http://devkids.blogspot.com
>
>> I can successfully do the following:
>>
>> xdocument doc = xdocument.load(... my file);
>> xelement bla = doc.descendants.("it").first();
>> ... do stuff ...
>> doc.save("myfile");
>> the above works great. however, i want to interact with the file with
>> exclusive access so that no other files can open it/write to it/etc.
>> while i'm doing stuff with it.
>>
>> i know that there's the normal FileStream.open (etc., fileshare.none),
>> but the xdocument class doesn't take a stream as a constructor.
>>
>> is there any way i can do this without having to use the xmldocument
>> class?
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
