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. Loadxmlerror

Loadxmlerror

Scheduled Pinned Locked Moved XML / XSL
json
5 Posts 4 Posters 21 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
    suresh_sathya
    wrote on last edited by
    #1

    Hi, I am having some content in textfile.iam reading the content from file by using API called Read file.I convert this string to bstr using (_bstr_t)string and then i called the method LoadXML(string,bool).But when iam parsing this iam not getting output. why it is so. Thanks in advance.

    R 1 Reply Last reply
    0
    • S suresh_sathya

      Hi, I am having some content in textfile.iam reading the content from file by using API called Read file.I convert this string to bstr using (_bstr_t)string and then i called the method LoadXML(string,bool).But when iam parsing this iam not getting output. why it is so. Thanks in advance.

      R Offline
      R Offline
      Roman Nurik
      wrote on last edited by
      #2

      if you're using MSXML, there is a method to load an XML file given a filename, not the file's contents... look it up in the MSXML SDK

      - Roman -

      C 1 Reply Last reply
      0
      • R Roman Nurik

        if you're using MSXML, there is a method to load an XML file given a filename, not the file's contents... look it up in the MSXML SDK

        - Roman -

        C Offline
        C Offline
        Colin Leitner
        wrote on last edited by
        #3

        Try this:

        Dim xml Set xml = CreateObject("MSXML2.DOMDocument") If Not WScript.Arguments.Count = 1 Then   WScript.Echo "Usage: cscript loadxml.vbs <xml-file.xml>"   WScript.Quit 0 End If If Not xml.load(WScript.Arguments(0)) Then   WScript.Echo "The XML file couldn't be loaded:"   WScript.Echo " Error: " + xml.parseError.reason + _                " Error code: 0x" + Hex(xml.parseError.errorCode)   WScript.Echo " in File """ + xml.parseError.url + """"   WScript.Echo " @ row "

        D 1 Reply Last reply
        0
        • C Colin Leitner

          Try this:

          Dim xml Set xml = CreateObject("MSXML2.DOMDocument") If Not WScript.Arguments.Count = 1 Then   WScript.Echo "Usage: cscript loadxml.vbs <xml-file.xml>"   WScript.Quit 0 End If If Not xml.load(WScript.Arguments(0)) Then   WScript.Echo "The XML file couldn't be loaded:"   WScript.Echo " Error: " + xml.parseError.reason + _                " Error code: 0x" + Hex(xml.parseError.errorCode)   WScript.Echo " in File """ + xml.parseError.url + """"   WScript.Echo " @ row "

          D Offline
          D Offline
          Domenic Denicola
          wrote on last edited by
          #4

          How'd you get that beautiful syntax highlighting? :omg:

          -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

          C 1 Reply Last reply
          0
          • D Domenic Denicola

            How'd you get that beautiful syntax highlighting? :omg:

            -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

            C Offline
            C Offline
            Colin Leitner
            wrote on last edited by
            #5

            I do it by hand X|. But I'm writing on a tool for highlighting to HTML code wich I will publish as an article ;). Guess what I can already render XML to HTML! (no XSLT, cause it reads also comments, PIs etc.) All ya need is VBS and MSXML 3. But I still need a few weeks :((.

            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