+ Reply to Thread
Results 1 to 3 of 3

retrieving node names

  1. #1
    Registered User
    Join Date
    05-15-2016
    Location
    Sydney
    MS-Off Ver
    excel 2013
    Posts
    21

    retrieving node names

    hi i have been struggling with get node names extracted from an xml file

    i want the vba code below to return all nodes as following
    e.g
    ParentNodeName/ChildNodeName
    ParentNodeName
    ParentNodeName
    ParentNodeName/ChildNodeName/ChildNodeName

    the xml has tuples and there are tuples within tuples. I just need the code to return all elements with parentnode name in front of it.

    Tried playing around with the following code but with no luck. Can someone please advise?

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-20-2016 at 09:52 AM. Reason: Please use code tags when posting code

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,650

    Re: retrieving node names

    Maybe inside the for ...Next is missing:
    Please Login or Register  to view this content.
    Quang PT

  3. #3
    Registered User
    Join Date
    05-15-2016
    Location
    Sydney
    MS-Off Ver
    excel 2013
    Posts
    21

    Re: retrieving node names

    Thank you Bebo. I added the bit you mentioned but it didnt work for me.
    I did come up with the code below which does the job. I dont need parentnodes "xbrli" and "#document" so i am setting them to vbNullString

    I dont feel a 100% satisfied(too many lines of code!) with it but it does the job. I am pretty sure this can be shorten down to a few lines but not sure how. Thank you for your input



    Please Login or Register  to view this content.
    Last edited by twozedz; 08-21-2016 at 08:37 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Get Node Key from selected Node in TreeView
    By mile990 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2016, 04:55 PM
  2. [SOLVED] Retrieving top-5 names
    By versuswhat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-16-2015, 02:02 PM
  3. Finding and Retrieving Numbers and Names from a Large Workbook
    By disfunctional in forum Excel General
    Replies: 4
    Last Post: 01-02-2015, 04:52 PM
  4. Excel macro for retrieving file names
    By Toadums in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-17-2008, 07:54 PM
  5. [SOLVED] Retrieving Values Saved in Names
    By Steve Drenker in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-03-2006, 11:55 PM
  6. [SOLVED] Retrieving Names of Worksheets
    By Brad Sumner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2005, 02:05 PM
  7. Retrieving Values Using Range Names as References
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 02:16 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1