Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8016407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:31:55+00:00 2026-06-04T20:31:55+00:00

I am having a xml file.this having the path for my log file(txt).This xml

  • 0

I am having a xml file.this having the path for my log file(txt).This xml file having some modules and each having the log file path.so i want to read the xml and list the details of each module then i want to read the txt file(using the path).can anyone please give some idea to do this stuff.

Thanks,
This is my xml file

        <?xml version="1.0" encoding="utf-8" ?> 
   <Modules>    
    <ServiceHost>
     <LogType value="FatalErrorLog">
     <Fields>
      <FileName>ServiceWS.log</FileName>
      <FileLocation>\\10.8.8.21\lv0\Logs\Prod\Service\</FileLocation>
      <IsLogFilterAvailable value="true" />
      <IsDateFilterAvailable value="true" />
      <IsDownloadRawFile value="false" />
    </Fields>
  </LogType>
   <LogType value="DebugLog">
     <Fields>
      <FileName>ServiceDebugWS.log</FileName>
      <FileLocation>\\10.8.8.21\lv0\Logs\Prod\ServiceHost</FileLocation>
      <IsLogFilterAvailable value="true" />
      <IsDateFilterAvailable value="true" />
      <IsDownloadRawFile value="false" />
    </Fields>
  </LogType>
</ServiceHost>
<Product value="Debug">
   <LogType>
     <Fields>
      <FileName>Product.log</FileName>
      <FileLocation>\\10.8.8.21\lv0\Logs\Prod\Endor\</FileLocation>
      <IsLogFilterAvailable value="true" />
      <IsDateFilterAvailable value="true" />
      <IsDownloadRawFile value="false" />
    </Fields>
  </LogType>
</Product>
<Portal value="Debug">
   <LogType>
     <Fields>
      <FileName>Portal.log</FileName>
      <FileLocation>\\10.8.8.21\lv0\Logs\Prod\SupportPortal\</FileLocation>
      <IsLogFilterAvailable value="true" />
      <IsDateFilterAvailable value="true" />
      <IsDownloadRawFile value="false" />
    </Fields>
  </LogType>
</Portal>
<Modules>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:31:57+00:00Added an answer on June 4, 2026 at 8:31 pm

    This should get you started:

    XmlDocument xml_Document = new XmlDocument();
    xml_Document.Load("C:\\settings.xml");
    var list = xml_Document.SelectNodes("//LogType [@value='Debug']");
    var logLocation = list.Item(0).SelectNodes("//FileLocation").Item(0).Value;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with some data I've imported from an XML file. Unfortunately I'm
I am having trouble writing to my XML file Here is my code: path
I've an XML file stored in App_Data which is only used to read some
I am developing a webpart that should read an XML file. For this I
Friends, My school project is having an xml data file: <patients> <patient> <regNo>2012/Mar/003</regNo> <name>Jhon</name>
I am having an issue with an XML file that I am generating from
I'm having trouble editing an XML file. I'm currently trying to use Nokogiri ,
I'm having trouble understanding why I would use a context.xml file to declare a
I'm using DOM to parse an xml file. And I am having trouble catching
Having a XML-structure like this: <ContextDoc> <PurchaseOrder xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <OrderForms> <OrderForm> <Shipments> <Shipment> ...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.