Solved

XML document modification

Posted on 2008-06-23
4
150 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 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now