Solved

XML document modification

Posted on 2008-06-23
4
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 350 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

636 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