Click here to Skip to main content
16,007,126 members
Home / Discussions / XML / XSL
   

XML / XSL

 
Generalexslt set:distinct template order Pin
Chris_D5-Aug-02 6:30
Chris_D5-Aug-02 6:30 
QuestionXML Schema for Office Web Component ver 9 and 10? Pin
Dmitry Novikov2-Aug-02 8:03
Dmitry Novikov2-Aug-02 8:03 
QuestionVARIANT to XML? Pin
mali1-Aug-02 19:34
mali1-Aug-02 19:34 
AnswerRe: VARIANT to XML? Pin
Ranjan Banerji2-Aug-02 5:05
Ranjan Banerji2-Aug-02 5:05 
GeneralWeb Services Implementation Guide Pin
Stanford Powers31-Jul-02 18:27
sussStanford Powers31-Jul-02 18:27 
GeneralLoadxmlerror Pin
suresh_sathya28-Jul-02 18:53
suresh_sathya28-Jul-02 18:53 
GeneralRe: Loadxmlerror Pin
Roman Nurik28-Jul-02 20:32
Roman Nurik28-Jul-02 20:32 
GeneralRe: Loadxmlerror Pin
Colin Leitner29-Jul-02 14:15
Colin Leitner29-Jul-02 14:15 
Try this:

<nobr>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 " + CStr(xml.parseError.line) + ", col " + CStr(xml.parseError.linepos)
  If Not xml.parseError.srcText = "" Then
    WScript.Echo
    WScript.Echo xml.parseError.srcText
    WScript.Echo String(xml.parseError.linepos - 1, "-") + "^"
  End If
  WScript.Quit -1
Else
  WScript.Echo "XML file loaded sucessfully."
End If

' Sucessfully loaded DOM tree is now available in the xml var

WScript.Echo xml.xml


How to use
Save the code above as 'loadxml.vbs'
Type in your console 'wscript //H:cscript' to use the console version of your wscript host.
Goto to the subdirectory with your xml data and the script.
Type 'loadxml anyfile'

Voilá!

The function used to load the file is 'load' Big Grin | :-D . Returns true/false wether it could load the file or not.

Good night everybody I need some sleep... zzzzzzSleepy | :zzz: zzzzzz
GeneralRe: Loadxmlerror Pin
Domenic Denicola31-Jul-02 10:14
Domenic Denicola31-Jul-02 10:14 
GeneralRe: Loadxmlerror Pin
Colin Leitner1-Aug-02 10:14
Colin Leitner1-Aug-02 10:14 
General"Empty" XML Document Pin
kenlefeb24-Jul-02 3:14
kenlefeb24-Jul-02 3:14 
GeneralRendering XML using JSP Pin
Hitu22-Jul-02 18:58
Hitu22-Jul-02 18:58 
GeneralRe: Rendering XML using JSP Pin
Sharad Ganesh29-Jul-02 19:33
Sharad Ganesh29-Jul-02 19:33 
GeneralRe: Rendering XML using JSP Pin
1-Aug-02 9:57
suss1-Aug-02 9:57 
QuestionHow to create a xml schema that maps to a file directory tree structure Pin
22-Jul-02 12:43
suss22-Jul-02 12:43 
GeneralUsing SSL with XML POST Pin
Sid Forcier22-Jul-02 8:02
Sid Forcier22-Jul-02 8:02 
GeneralBeginner XSL problem Pin
tomiga17-Jul-02 1:49
tomiga17-Jul-02 1:49 
GeneralRe: Beginner XSL problem Pin
MS le Roux17-Jul-02 5:26
MS le Roux17-Jul-02 5:26 
GeneralRe: Beginner XSL problem Pin
tomiga17-Jul-02 5:35
tomiga17-Jul-02 5:35 
QuestionXSL Transform Textarea Problem w/IE6? Pin
DVryce12-Jul-02 3:07
DVryce12-Jul-02 3:07 
AnswerRe: XSL Transform Textarea Problem w/IE6? Pin
Christopher Lord14-Jul-02 10:52
Christopher Lord14-Jul-02 10:52 
AnswerRe: XSL Transform Textarea Problem w/IE6? Pin
Paul Watson8-Aug-02 7:03
sitebuilderPaul Watson8-Aug-02 7:03 
GeneralDatabase Problem Pin
BHBAD10-Jul-02 4:25
sussBHBAD10-Jul-02 4:25 
GeneralWriting XML to file with tabs etc Pin
Jan R Hansen10-Jul-02 0:55
Jan R Hansen10-Jul-02 0:55 
GeneralRe: Writing XML to file with tabs etc Pin
Anonymous10-Jul-02 4:17
Anonymous10-Jul-02 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.