.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to update element value in xml file on disk without loading the xml in memory?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

Hi everyone,

I am working on xml for almost three month but still i can't solve the update problem of element in xml file directly on the disk without loading the whole xml document. Rather i want to load only the particular element of xml and change it and update xml file on disk.



                               <name>name of waypoint</name>

                               <name>second waypoint</name> 

What i am trying is to update the value of name element of second waypoint without loading the whole gpx in object, 
rather to update the value directly oto the disk, and also the description doesn't show if there is null or empty.

View Complete Post

More Related Resource Links

file upload in chunks or not buffering in memory before writing to disk?


What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


Update Profile Database from text file using BDC



I have a requirement to import the profile properties from a text file in sFTP to update the MOSS Profile Database. The objective is to create a single repository for the Staff Directory in MOSS.

Can I use BDC to connect and update the Profile database?

What is the alternate approach?


Data loading from text file

Hi, I am loading the data from a flat file into a sql table. The values in one of the column have spaces at the end of the value. I want to remove those spaces and load into the table. I am thinking of using derived column and use rtrim on that column, how can I use that as an expression. Thanks.sqldev

Consistently running out of page file memory with full text indexer

Using MS SQL Server 2008 SP1 x64 Standard Edtion on Windows 2008 R2 Enterprise, I'm about to full-text index for the first time 1 table and 2 views. The table contains about 250'000 entries with a data space of 180 MB. As soon as I activate the full text indexing, the fdhost.exe task starts to consume slowly but surely all the available page file space (this can be easily watched using the Resource Monitor and the Commit Charge graph on the memory tab). Once all the virtual memory has been consumed, the server becomes unusable since it can't open any new windows any more, and RDP stops working. The machine specs are as follows: 12 GB of RAM 80 GB free on hard disk out of 136 GB 8 CPUs Custom size paging file with sizes between 24 GB - 60 GB (originally, this was system managed size, but then the server ran out of memory sooner) Max SQL server memory set to 6 GB (first 10 GB, then 8 GB) I've set the max fulltext crawl range to 8. During the indexing, the 8 CPUs are bit busy for a while, but not excessively. What is astonishing is that there is almost no use of physical memory during the indexing (I can see an increase from 2 GB to 3 GB which still leaves plenty of RAM available). Does anybody have an idea how I can convince fdhost.exe to consume physical memory and leave the paging memory alone? Or what else can I try?

reading excel file without saving to disk first

Having an issue.  I need to be able to read an excel file from a file upload control but I can not save the file to disk first, it must be done in memory.string excelConnectionstring = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="; excelConnectionstring += filePath.Replace("/", "\\"); excelConnectionstring += ";Extended Properties='Excel 8.0;HDR=YES;IMEX=1;'"; OleDbConnection con = new OleDbConnection(excelConnectionstring); OleDbDataAdapter da = new OleDbDataAdapter();Above is my code for reading the data file if it IS saved to disk, but again, I have to be able to do this without saving the file to disk, it must be done in memory.  I have not been able to find any sample code anywhere on how to do this from memory, everything seems to force the file be uploaded, saved to disk, and then read in the connection string, which again I can not do.Any advise would be great, thanks in advance.  I'm really in a bind here.

Error Loading dll file

RUNDLL:  Error loading C:\WINDOWS\etowufilelufiwu.dll.  The specific module could not be found.

find and replace linebreaks in file read from disk

I have a css file which I want to read from disk and in that content I want to find and replace all linebreaks (do I look for vbCrlf or ...?)   Public Shared Function GetFileContents(ByVal FullFilename As String) As String        Dim filecontents As String = ""        If File.Exists(FullFilename) Then            Dim objStreamReader As StreamReader            objStreamReader = File.OpenText(FullFilename)            filecontents = objStreamReader.ReadToEnd()            objStreamReader.Close()        End If       Return filecontents    End FunctionSo in the returned variable "filecontents" I want to find and replace any linebreaks.        FILE: style.css#progress{color:#000;width:500px;height:30px;padding:0px;clear:both;}#progress ul{list-style:none;padding:0px;margin: auto;display:block;}#progress ul li{list-style:none;display:inline;float:left;width:auto;height:30px;padding:0px;line-height:30px; font-family:Arial, Helvetica, sans-serif; font-size:13px;}

ssis 2008 Loading MULTIPLE EXCEL file

HI it is possible for me to load multiple text file using for each loop,but if i try the same process for EXCEL file then my excel source throws an error. Also when i created my variable in value  i have given the path of my excel file ,still it didnt help me..because the moment i map the variable with the connection string of source excel connnection(property->expression->connection string) it start giving error if you could help me or provide some reference it will be of great help http://bi-polar23.blogspot.com/2007/08/loading-multiple-excel-files-with-ssis.html i tried this link but got stuck with it on step 12 and 14 (below  is my connection string) and variable is @Filename which i have created Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\mushtaq.sheikh\Desktop\ForEach\New Microsoft Excel Worksheet1.xlsx;Extended Properties="Excel 12.0;HDR=YES"; The moment i try to edit my connection string by comparing connection string provided in link it gives error(an OLEBD error has occured with error code 0x80040E73) on excel source Thanks in advance

SMS reporting server configuration error: The MemoryLimit Element is not a configuration file elemen

Attempting to configure reporting services for SCCM 2007 SP2 R2. Installed SQL Standard 2008 reporting services. Attempting to configure reporting services, but service will not start w/ error: System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.    at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)    at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start) Digging into Reporting Services logs reveals: rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: CLR runtime is initialized. rshost!rshost!1900!09/08/2010-14:50:25:: i INFO: Derived memory configuration based on physical memory as 16775112 KB appdomainmanager!DefaultDomain!1b54!09/08/2010-14:50:25:: i INFO: Entered managed ServiceMain in DefaultDomain. configmanager!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Error loading configuration file: The configuration file contains an element that is not valid. The MemoryLimit element is not a configuration file element. library!DefaultDomain!5ac!09/08/2010-14:50:26:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: , Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The report server has encountered a configuration error.&nb

Can anyone explain how SQL Server performance scales with CPUs/Cores, memory, disk drives, etc?

I have experienced the situation where our application running on an expensive system with two 4 core CPUs ran slower than on a cheap machine with one dual core CPU. Both machines had similar memory capacity. In each case, the same query was being run by only one user. It would be nice to find a way to increase performance, but if adding cores doesn't help, what can a poor developer do? Customers get annoyed when they spend a truckload of money on a new server and nothing changes... Another potential problem is when customers have an expensive SAN system Sometimes the performance is much slower then on a system with conventional storage. Can anyone explain the relationship between SQL Server perfomance and hardware ?

File upload control and update panel ... ab-normal behavior?

 I have two update panels on single page . 1st one contain drop down and some other controls. I have used asyncpostbacktrigger in 1st update panel.  while in second PostBackTrigger (because of file upload). When page loads , it first dislays the content of 1st udate panel, when I click button to show the content of 2nd update panel , its contents are not displayed. look at this code, it demonstrates what I mean to say. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:panel ID="pnl" runat="server"> <asp:DropDownList ID="drpdwn" runat="server"> <asp:ListItem>Item 1</asp:ListItem> <asp:ListItem>Item 2</asp:ListItem> </asp:DropDownList> </asp:panel> <asp:Button ID="lnkbtnNext" runat="server" Visible="false" onclick="Button1_Click" Text="Next" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="lnkbtnNext" /> </Triggers> </asp:UpdatePanel> <asp:UpdatePanel ID="updpnl3" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:PlaceHolder ID=&qu

File Upload Control is not working in Update Panel

hi friend... i am using update panel... in one of my aspx page (ASP.NET 2.0)there is a file upload control in update panel which is used to upload company logo on server..when i remove the update panel.. than file upload is working properly..but when i again place an update panel then file upload control is not working and its giving me error.. in likeIf String.IsNullOrEmpty(fldLogo.PostedFile.FileName.ToString) Then                 as object reference not set to an instance of an object... can any body help me ?any idea ??  

Sdf file doesn't update once the application close

     i have configured for data sync setup using configure data synchronization wizard, then deploy the application in emulator. while run the application the data has synched back and forth from client to server on two way sync.  once application get closed the sdf.file is only having  existing data which is same as we got end point of configuration. we can view the updated data while run the application. but we restart application we didn't have the updated and newly inserted data . i don't know what i missed in config. it would be great help if anyone guide me.

how to periodically update database file of my wpf application?

Hi, I have a WPF Windows application which we distribute to our clients. The application consists of some database table which changes every month. eg. the application users a  exchange rate table which is valid for one month. What is the best approach to update the data in these table. Please note that the whole application is not changing but only the data in it changing. Please guide me with some options how I can achieve this task. Thank You. Mohamed Ziyad

How to update JavaScript in SharePoint Ribbon Elements.xml file?


I created Elements.xml file that added button to Ribbon of Web Part page.
I created <CommandUIHandler tag and put JavaScript into CommandAction.
Everything works.

I inserted changes to JavaScript and built and deployed project in VS2010.
The button function was not changed the previous JavaScript was used. I uninstalled feature and rebuilt and redeployed project. The button functionality was not changed again.

What I have to do that JavaScript changes work in CommandAction?

Thank you in advance for any help.

Boris Nossov

There has been an error while loading the form - The following file is not a valid InfoPath form tem



We’re experiencing quite an odd issue with opening forms within a SharePoint form library. These are the symptoms;

We recently published a newer version of an InfoPath form, and have since received some feedback that the form no longer opens in the “View Properties” view of SharePoint.

Rather interesting though, within the standard view all form instances can be opened with no problem.

The reason this has to work within the “View Properties” view of SharePoint is because we have a workflow that is sent, with a link to this particular page.

This is the error message that is displayed;


There has been an error while

Loading .htm file into div


Hey Forumers,

I am a little lost at how to do this. I have implemented a file upload system for users to upload text files into the files system. 

All files in the file system are .htm text files. All I want to achieve is to load the contents of the html files (which are clean html text) into a div tag.

I know this can be achieved by using the document.getElementById("elementID").innerHtml but the part I am lost is how to load the file using a querystring from the server into javascript code

If there is any clarification needed based on the above, please ask.

Thanks in advance.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend