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. Is there an "include" directive in XML?

Is there an "include" directive in XML?

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

    I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
    Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
    Every line of code is a liability - Taka Muraoka
    Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

    M Richard DeemingR 2 Replies Last reply
    0
    • M Marc Clifton

      I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
      Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
      Every line of code is a liability - Taka Muraoka
      Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #2

      No you are not blind. There was an include processor command but it was rather unsecure do a google on "Xml eXternal Entity" and was removed if my memory is working tonight. :-O Take a look at XInclude (candidate recomendations) and XLink (recomendation) XInclude[^] XLink[^] ""

      1 Reply Last reply
      0
      • M Marc Clifton

        I want to be able to concatenate several XML files together, and I can't find anything on W3C.org that says xml has an "include" tag. Does it? Am I blind? Or am I screwed? Conversely, the reason I need this is because the stupid XmlDataDocument.Load method can't be called more than once. It requires a blank document, and there is no Append or similar function. X| Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
        Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
        Every line of code is a liability - Taka Muraoka
        Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"

        Richard DeemingR Online
        Richard DeemingR Online
        Richard Deeming
        wrote on last edited by
        #3

        Have a look at the ImportNode and AppendChild methods. Something like this should work:

        XmlDataDocument doc1 = LoadDoc1();
        XmlDataDocument doc2 = LoadDoc2();
        foreach(XmlNode source in doc2.DocumentElement.ChildNodes)
        doc1.DocumentElement.AppendChild(doc1.ImportNode(source, true));


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        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