Improve company productivity with a Business Account.Sign Up

x
?
Solved

XML document modification

Posted on 2008-06-23
4
Medium Priority
?
169 Views
Last Modified: 2010-05-18
I am working on a new QA tool.When i run some services on the tool like restart service and shutdown service, an XML file is created at a location.When i was working on 1 such service, i restarted a service called ASP.net and the XML file looks like this:
  <?xml version="1.0" encoding="utf-8" ?>
- <XMLTestCollection>
- <ServiceMonitorList TServiceMonitors="ServiceMonitors">
- <ServiceMonitor name="HTTPFilter" scriptVersion="1.0.0">
  <ScreenName ScreenName="HTTP SSL" />
  <DisplayName DisplayName="HTTP SSL" />
  <ProcessName ProcessName="Idle" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="1" />
  </ServiceMonitor>
- <ServiceMonitor name="McTaskManager" scriptVersion="1.0.0">
  <ScreenName ScreenName="McAfee Task Manager" />
  <DisplayName DisplayName="McAfee Task Manager" />
  <ProcessName ProcessName="vstskmgr" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="Eventlog" scriptVersion="1.0.0">
  <ScreenName ScreenName="Event Log" />
  <DisplayName DisplayName="Event Log" />
  <ProcessName ProcessName="services" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="2" />
  </ServiceMonitor>
- <ServiceMonitor name="RpcSs" scriptVersion="1.0.0">
  <ScreenName ScreenName="Remote Procedure Call (RPC)" />
  <DisplayName DisplayName="Remote Procedure Call (RPC)" />
  <ProcessName ProcessName="svchost" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="aspnet_state" scriptVersion="1.0.0">
  <ScreenName ScreenName="ASP.NET State Service" />
  <DisplayName DisplayName="ASP.NET State Service" />
  <ProcessName ProcessName="Idle" />
  <PriorityDisplay PriorityDisplay="False" />
  <PriorityLocation PriorityLocation="0" />
  </ServiceMonitor>
- <ServiceMonitor name="Dnscache" scriptVersion="1.0.0">
  <ScreenName ScreenName="DNS Client" />
  <DisplayName DisplayName="DNS Client" />
  <ProcessName ProcessName="svchost" />
  <PriorityDisplay PriorityDisplay="True" />
  <PriorityLocation PriorityLocation="3" />
  </ServiceMonitor>
  </ServiceMonitorList>
  </XMLTestCollection>


Is there a way where i can modify or delete the contents of the XML file because i tried doing it from the location , but i am unable to modify or delete the ASP.NET State service.Please help me.
0
Comment
Question by:rishab2905
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 21853960
What is the filename of the XML file?
It looks like it could be the output of a service-monitoring service.  If so, it may remain open for long periods of time (making it impossible to delete).  In any case, it may be unwise to delete it.
0
 

Author Comment

by:rishab2905
ID: 21858633
ya, you are right.It is the output of a service-monitoring service.what can be done to close it.for example in tha above XML file, the "asp_net state " is not starting up and it is shown in the output as "Detected ASP.NEt service Stopped".What can be done to remove the above statement from the output document?Please clarify?
0
 

Accepted Solution

by:
rishab2905 earned 0 total points
ID: 21858657
the file name is ServiceMonitor.xml and the services listed in the above Xml document are the various kinds of services that are being monitored.
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 1400 total points
ID: 21860841
I still don't understand why you would want to modify a log file (other than to hide some action that should not be hidden).  Please describe your reasons.

In any case, if the file is owned by a process that is protecting it from being modified, then probably the only way to modify it would be to stop that process.  Finds out which System Service is keeping the file open, and do a
    net stop <serviceName>
and the file can then be deleted.
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Watch the video to know how one can repair corrupt Exchange OST file effortlessly and convert OST emails to MS Outlook PST file format by using Kernel for OST to PST converter tool. It can convert OST to MSG, MBOX, EML to access them. It can migrate…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

606 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question