Consulting

Results 1 to 4 of 4

Thread: Processing XSD schemas using VBA

  1. #1

    Processing XSD schemas using VBA

    Hi,

    I'm trying to find a way to process a XSD schema as an internal structure in VBA. The use case is that I try to produce an easy-to-read tree structure into a worksheet representing the XSD (I'm trying to build a simple documentation tool where end users can easily document how a elements in a schema maps to some other, non-XML structure). Anyone done anything similar?

    Thanks in advance!

    /Martin

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Hi Martin,
    You can access the XML parser included in the MDAC. The XML library for exposed to COM (and thereby VBA) is msxml2.dll. You can access it's properties and methods by setting a reference to that file. The MSDN documentation is currently here: http://msdn.microsoft.com/en-us/library/ms763742.aspx

    If you into trouble post back
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Hi,

    Thanks for your reply. I am aware of MSXML2 and have used it occasionally to process XML-files, but as far as I can tell, there is no way to process schemas as such. I did find an XMLSchemaCashe class, but from the little I read anout it, it seems to require an XML-file with a schema reference, and it's primary purpose is to cashe schemas to speed up validation, if I understood correctly. I'm looking for something that could (by using a method) read an .xsd-file from disk and leave me with a structure that I could traverse and produce the desired simplified tree I'm looking for.

    /Martin

  4. #4
    VBAX Newbie
    Joined
    Aug 2011
    Posts
    1
    Location
    Hi,

    I have the same problem. I have schema in xsd file and I want read this schema, to get from it elements structure, in vba. I use msxml6.dll. I tray with XMLSchemaCache60 but I can't read xsd file. I you have more inforamtion about it, I will be very grateful if you tell me.

Posting Permissions

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