Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. parse xml

parse xml

Scheduled Pinned Locked Moved C#
xmltutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MaheshSharma
    wrote on last edited by
    #1

    how to parse xml recusive based on directory and search criteria to get file name

    <FileSystem>
    <Drives>
    <Drive name="C:">
    <Folder name="data">
    <Folder name="CSLogs">
    <Folder name="Applications">
    <Folder name="Citrix">
    <Folder name="XenDesktop Installer">
    <Folder name="MSI Log Files">
    <File Name="BrokerAgent_x64311392187.txt" />
    <File Name="CitrixCse_x641365171634.txt" />
    <File Name="DirectorVDAplugin_x64276896625.txt" />
    <File Name="IcaWS_x64397216209.txt" />
    <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
    <File Name="MachineManagementProvider_x64407826716.txt" />
    <File Name="personalvDisk_x64359317401.txt" />
    <File Name="profilemgt_x641717284940.txt" />
    <File Name="PzAppV_VDA_x641126819295.txt" />
    <File Name="UpsClient_x641677360187.txt" />
    <File Name="VdaMonitorPlugin_x64958367608.txt" />
    <File Name="WMIProxy_x64801526517.txt" />
    </Folder>
    <File Name="XenDesktop Installation.log" />
    </Folder>
    <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
    <File Name="FixPolicyCorruption.ps1.log" />
    </Folder>

    D L B 3 Replies Last reply
    0
    • M MaheshSharma

      how to parse xml recusive based on directory and search criteria to get file name

      <FileSystem>
      <Drives>
      <Drive name="C:">
      <Folder name="data">
      <Folder name="CSLogs">
      <Folder name="Applications">
      <Folder name="Citrix">
      <Folder name="XenDesktop Installer">
      <Folder name="MSI Log Files">
      <File Name="BrokerAgent_x64311392187.txt" />
      <File Name="CitrixCse_x641365171634.txt" />
      <File Name="DirectorVDAplugin_x64276896625.txt" />
      <File Name="IcaWS_x64397216209.txt" />
      <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
      <File Name="MachineManagementProvider_x64407826716.txt" />
      <File Name="personalvDisk_x64359317401.txt" />
      <File Name="profilemgt_x641717284940.txt" />
      <File Name="PzAppV_VDA_x641126819295.txt" />
      <File Name="UpsClient_x641677360187.txt" />
      <File Name="VdaMonitorPlugin_x64958367608.txt" />
      <File Name="WMIProxy_x64801526517.txt" />
      </Folder>
      <File Name="XenDesktop Installation.log" />
      </Folder>
      <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
      <File Name="FixPolicyCorruption.ps1.log" />
      </Folder>

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Please do not repost your question. You need will need to show code you have tried and where you are stuck. Also, why this muh of blank space? This is what may do: 1. Remove the other post with same question. 2. Update this post with formatted relevant code 3. Tell us where exactly are you stuck.

      "You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[^]

      1 Reply Last reply
      0
      • M MaheshSharma

        how to parse xml recusive based on directory and search criteria to get file name

        <FileSystem>
        <Drives>
        <Drive name="C:">
        <Folder name="data">
        <Folder name="CSLogs">
        <Folder name="Applications">
        <Folder name="Citrix">
        <Folder name="XenDesktop Installer">
        <Folder name="MSI Log Files">
        <File Name="BrokerAgent_x64311392187.txt" />
        <File Name="CitrixCse_x641365171634.txt" />
        <File Name="DirectorVDAplugin_x64276896625.txt" />
        <File Name="IcaWS_x64397216209.txt" />
        <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
        <File Name="MachineManagementProvider_x64407826716.txt" />
        <File Name="personalvDisk_x64359317401.txt" />
        <File Name="profilemgt_x641717284940.txt" />
        <File Name="PzAppV_VDA_x641126819295.txt" />
        <File Name="UpsClient_x641677360187.txt" />
        <File Name="VdaMonitorPlugin_x64958367608.txt" />
        <File Name="WMIProxy_x64801526517.txt" />
        </Folder>
        <File Name="XenDesktop Installation.log" />
        </Folder>
        <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
        <File Name="FixPolicyCorruption.ps1.log" />
        </Folder>

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        How to: Parse XML with XmlReader[^].

        1 Reply Last reply
        0
        • M MaheshSharma

          how to parse xml recusive based on directory and search criteria to get file name

          <FileSystem>
          <Drives>
          <Drive name="C:">
          <Folder name="data">
          <Folder name="CSLogs">
          <Folder name="Applications">
          <Folder name="Citrix">
          <Folder name="XenDesktop Installer">
          <Folder name="MSI Log Files">
          <File Name="BrokerAgent_x64311392187.txt" />
          <File Name="CitrixCse_x641365171634.txt" />
          <File Name="DirectorVDAplugin_x64276896625.txt" />
          <File Name="IcaWS_x64397216209.txt" />
          <File Name="MachineIdentityServiceAgent_x64492650649.txt" />
          <File Name="MachineManagementProvider_x64407826716.txt" />
          <File Name="personalvDisk_x64359317401.txt" />
          <File Name="profilemgt_x641717284940.txt" />
          <File Name="PzAppV_VDA_x641126819295.txt" />
          <File Name="UpsClient_x641677360187.txt" />
          <File Name="VdaMonitorPlugin_x64958367608.txt" />
          <File Name="WMIProxy_x64801526517.txt" />
          </Folder>
          <File Name="XenDesktop Installation.log" />
          </Folder>
          <File Name="23157CIXXenDesktopVirtFx_Popup.log" />
          <File Name="FixPolicyCorruption.ps1.log" />
          </Folder>

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          To "get the FileName" by ... what ? Do you need to essentially de-serialize the entire XML stream into a usable object/Class structure ... that you could use do complex queries on ? Or, is your need more simple, for example: given a Directory string filepath return all the Files in that Directory as a string[] ?

          «Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups