Using MSXML2.oXTLRuntime methods in VB / JavaScript ?

Discussion in 'XML' started by Phil, Oct 16, 2003.

  1. Phil

    Phil Guest

    Hi all,

    In JavaScript or VB I want to use the XML - IXTLRuntime method
    FormatNumber. Trouble is that the class is Not Creatable, though it is
    Public (in VB Object Browser!).

    In the documentation (XML 3) it even states there is a Visual Basic
    syntax like this:

    strValue = oXTLRuntime.formatNumber(dblNumber, bstrFormat)

    so I tried this code:
    >>>> CODE SNIPPET >>>>

    Dim xmlFunc As MSXML2.IXTLRuntime
    Dim xyz As Double
    Dim abc As String

    xyz = 1234567.89
    set xmlfunc=new msxml.ixtlruntime ' DOES NOT WORK !!!
    abc = xmlFunc.FormatNumber(xyz, ",")

    <<<< END CODE <<<<

    and it does not work. This, of course is because the class is not
    createable.

    So what interface can I use to access this function in VB or JavaScript
    without using an XSL STylesheet!

    The reason is not to use it in VB of course, but in fact to use it in
    JavaScript on a client using the New ActiveX Object syntax. Then I can
    format a number to currency in 1 line of code!

    thanks for any help

    Philip




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Phil, Oct 16, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul
    Replies:
    0
    Views:
    526
  2. Raúl Martín
    Replies:
    1
    Views:
    11,032
    Natty Gur
    May 13, 2004
  3. Patrick

    webservice call using MSXML2.HTTP

    Patrick, Sep 9, 2004, in forum: ASP General
    Replies:
    17
    Views:
    872
    [MSFT]
    Sep 20, 2004
  4. s_m_b
    Replies:
    2
    Views:
    839
    s_m_b
    Jan 16, 2006
  5. Kenneth McDonald
    Replies:
    5
    Views:
    379
    Kenneth McDonald
    Sep 26, 2008
Loading...

Share This Page