Consulting

Results 1 to 6 of 6

Thread: XML parsing in VBA on Mac

  1. #1

    XML parsing in VBA on Mac

    Hello All,

    I've been writing VBA macros for a few years - always for MS Excel on Windows OS, but now I am faced with a challenge of extending help to someone who needs to run a macro I wrote to parse an XML file on a Mac. The macro I wrote simply uses the msxml.dll in reference and creates objects of DOMDocument and IXMLDOMNode in the code to parse the xml and extract required data. However this is failing when run on a Mac.

    I have never worked on Mac and don't even have access to one, can someone help me to find a way to read and parse an xml file in a macro that would run on a Mac?

    Thanks,
    ~SS

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hi Smart,
    I moved this to the Mac specific forum where I think you will get better help for your problem. Don't do Mac myself so I can't help you there. I left a redirect from the excel forum so if anyone sees it there they can follow the thread here if they think they can help.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Thanks Lucas!

  4. #4
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    Howdy. Rick Schaut (MS MacBU) wrote on one aspect of this (when commenting on the converter planned for XL2008):

    Rick Schaut Says:
    December 7th, 2006 at 4:20 pm ,
    With respect to libXml, there are some additional points worth considering:

    1) 18 months ago, we hadn?t made the decision of the minium OS version that Office 12 was going to support.

    2) Shipping an updated version of an open source library is a non-starter, for one simple reason: if there?s a security flaw in the version we ship, we?re on the hook for that security issue without having ownership of the code. The potential legal issues are too risky to allow us to go down that route.

    3) We need more than just SAX2 compliance. We also need DOM support on the write side.

    4) LibXML?s APIs all use UTF8 for string arguments (or, at least, the libXML that shipped with Panther did). MSXML uses UTF16. Since Win Office is written to MSXML, we?d either have to rewrite considerable portions of the code we port from Win Office, or write UTF16 wrappers around the API?s and the callbacks.

    All of those combined to make a difficult decision fall on the MSXML side of the fence.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

  5. #5
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    Here is the entire dialog related to this topic, where Rick continues to elaborate on the differences between the two LibXML and MSXML.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

  6. #6
    Mac Moderator VBAX Expert shades's Avatar
    Joined
    May 2004
    Location
    Kansas City, USA
    Posts
    638
    Location
    As a further comment, XML support in Office 2004 for Mac is minimal at best.

    Software: LibreOffice 3.3 on Mac OS X 10.6.5
    (retired Excel 2003 user, 3.28.2008 )
    Humanware: Older than dirt
    --------------------
    old, slow, and confused
    but at least I'm inconsistent!

    Rich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •