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. String vs. XML file

String vs. XML file

Scheduled Pinned Locked Moved XML / XSL
xmlvisual-studioquestion
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.
  • S Offline
    S Offline
    sonicsqwirl
    wrote on last edited by
    #1

    I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott

    P M 2 Replies Last reply
    0
    • S sonicsqwirl

      I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott

      P Offline
      P Offline
      Per Nilsson
      wrote on last edited by
      #2

      You can load the tring into an XMLDocument object much like you load it from file. HRESULT loadXML(BSTR bstrXML,VARIANT_BOOL * isSuccessful); This migth be an Microsoft extension of the DOM model, but it exists in MSXML. Then it is possible to transform it using the transformNode method of the XMLDocument object. HRESULT transformNode(IXMLDOMNode *stylesheet, BSTR *xmlString); /Per

      1 Reply Last reply
      0
      • S sonicsqwirl

        I have a project, in which we need to read in an XML file. But, when we read in that file, we need to parse it so that only designated data is used. So we parsed it into a string. We now are running into the difficulty of passing the String into the XSLT. Is there a way to convert a String with XSLT, or do we need to rewrite the XML file? TIA, Scott

        M Offline
        M Offline
        Michael Flanakin
        wrote on last edited by
        #3

        What language/technology are you using? Michael Flanakin Web Log

        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