Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Using MSXML2.oXTLRuntime methods in VB / JavaScript ?

Reply
Thread Tools

Using MSXML2.oXTLRuntime methods in VB / JavaScript ?

 
 
Phil
Guest
Posts: n/a
 
      10-16-2003

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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to find the class methods of a class, just like'methods' finds the instance methods? Kenneth McDonald Ruby 5 09-26-2008 03:09 PM
Using object methods of first module in methods of second module Nikita Petrov Ruby 2 04-06-2008 08:49 PM
Top-Up Methods - Finarea (Voipcheap, internetcalls, etc.) et. al., VOIP Services Question - Top-up Methods News Reader UK VOIP 0 04-10-2006 02:41 PM
Why Petshop Changed all static methods to instance methods when upgrading from version 3.0 to version 3.1? Neo ASP .Net 1 01-07-2005 01:46 AM
Re: Templates and friends and template methods with private methods. Buster Copley C++ 5 07-07-2003 12:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57