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. XML / XSL
  4. XML Innertext Add's all my nodes! What am i doing wrong?

XML Innertext Add's all my nodes! What am i doing wrong?

Scheduled Pinned Locked Moved XML / XSL
questioncsharpxmlcareer
3 Posts 3 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
    MegaBlasterX
    wrote on last edited by
    #1

    XML: DbRemote; License; UploadFile; DownloadFile; ; C# Code: List AutostartJobsStringList = new List(); foreach (XmlNode AutostartNode in kindknoop.ChildNodes) { if (AutostartNode.Name== "Job") AutostartJobsStringList.Add(kindknoop.Value); } Output: AutostartJobsStringList[0] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[1] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[2] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[3] == DbRemoteLicenseUploadFileDownloadFile Preferred output: AutostartJobsStringList[0] == DbRemote AutostartJobsStringList[1] == License AutostartJobsStringList[2] == UploadFile AutostartJobsStringList[3] == DownloadFile Question: What am i doing wrong? How can i get the preffered output?

    L L 2 Replies Last reply
    0
    • M MegaBlasterX

      XML: DbRemote; License; UploadFile; DownloadFile; ; C# Code: List AutostartJobsStringList = new List(); foreach (XmlNode AutostartNode in kindknoop.ChildNodes) { if (AutostartNode.Name== "Job") AutostartJobsStringList.Add(kindknoop.Value); } Output: AutostartJobsStringList[0] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[1] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[2] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[3] == DbRemoteLicenseUploadFileDownloadFile Preferred output: AutostartJobsStringList[0] == DbRemote AutostartJobsStringList[1] == License AutostartJobsStringList[2] == UploadFile AutostartJobsStringList[3] == DownloadFile Question: What am i doing wrong? How can i get the preffered output?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Your problem does not appear to have anything to do with XML.

      MegaBlasterX wrote:

      foreach (XmlNode AutostartNode in kindknoop.ChildNodes) { if (AutostartNode.Name== "Job") AutostartJobsStringList.Add(kindknoop.Value); }

      led mike

      1 Reply Last reply
      0
      • M MegaBlasterX

        XML: DbRemote; License; UploadFile; DownloadFile; ; C# Code: List AutostartJobsStringList = new List(); foreach (XmlNode AutostartNode in kindknoop.ChildNodes) { if (AutostartNode.Name== "Job") AutostartJobsStringList.Add(kindknoop.Value); } Output: AutostartJobsStringList[0] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[1] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[2] == DbRemoteLicenseUploadFileDownloadFile AutostartJobsStringList[3] == DbRemoteLicenseUploadFileDownloadFile Preferred output: AutostartJobsStringList[0] == DbRemote AutostartJobsStringList[1] == License AutostartJobsStringList[2] == UploadFile AutostartJobsStringList[3] == DownloadFile Question: What am i doing wrong? How can i get the preffered output?

        L Offline
        L Offline
        leejs413
        wrote on last edited by
        #3

        foreach (XmlNode AutostartNode in kindknoop.ChildNodes)
        {
        if (AutostartNode.Name== "Job")
        AutostartJobsStringList.Add(AutostartNode.InnerText);
        }

        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