Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default XML API in VBA under Excel?

Hi;

If this is the wrong forum, please tell me which forum to hit.

I am writing a VBA applet for Excel (and Excel only). By way of
background - I have a ton of experience writing C# (including Excel
AddIns) and Java - but never Basic before.

In the text of a cell I need to parse XML fragments and then get back
the element name and some specific attributes. The string I need to
parse will be one of the following 3 forms:

<data name='dave' type='int'
<data name='dave' type='int'/
</dave

Is there an API in VBA where I can give it an XML fragment and then
get back the node name and attribute values? If so, what is the API
and anything specific I have to do to tell it that in 2 of the cases
it's an XML fragment.

Also, is this library always installed or do we need to install it if
it's not on a user's computer? This needs to run on Excel 2000, 2002,
2003, & 2007.

thanks - dave


Windward Reports --
http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default XML API in VBA under Excel?

Hi Dave

Set a reference (tools menu) to a Microsoft XML library and it should do it
for you. VBA language is VB6 language, so you'll find lots of code samples
on the web.

Nothing is always installed, at least not in the very same version. It is
called DLL hell. But if you code for an early version library, like MS XML
2.0, it should in theory work for all later versions as well. Likewise,
create your material in the earliest Excel version required, 2000 if I
understand this correct.

HTH. Best wishes Harald

"David Thielen" wrote in message
...
Hi;

If this is the wrong forum, please tell me which forum to hit.

I am writing a VBA applet for Excel (and Excel only). By way of
background - I have a ton of experience writing C# (including Excel
AddIns) and Java - but never Basic before.

In the text of a cell I need to parse XML fragments and then get back
the element name and some specific attributes. The string I need to
parse will be one of the following 3 forms:

<data name='dave' type='int'
<data name='dave' type='int'/
</dave

Is there an API in VBA where I can give it an XML fragment and then
get back the node name and attribute values? If so, what is the API
and anything specific I have to do to tell it that in 2 of the cases
it's an XML fragment.

Also, is this library always installed or do we need to install it if
it's not on a user's computer? This needs to run on Excel 2000, 2002,
2003, & 2007.

thanks - dave


Windward Reports --
http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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



All times are GMT +1. The time now is 09:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"