Results 1 to 3 of 3

Thread: Converting XML to controls

  1. #1

    Thread Starter
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372

    Converting XML to controls

    Sat for some time trying to work out what to title this thread. Thats the best I could do :/.

    Anyway, what I'm trying to do is take an XML file and convert commands into controls and procedures etc. The best way is to explain this with an example:
    Lets say I have the following
    <txtInputField>
    <Text>
    This is new text to set
    </Text>
    </txtInputField>

    What I want to do is somehow convert this into txtInputField.Text = "This is new text to set"

    Now, my problem is obvious - how do I convert a string name into a control without 10 000 if statements. I know if I have the control that I can use the CallByName procedure. Is there something similar to get a handle of an object?

    Any help appreciated

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    You should investigate Serialization / Deserialization. This allows objects to be saved to xml and read in from xml. Sounds like it might help.

  3. #3

    Thread Starter
    Hyperactive Member marnitzg's Avatar
    Join Date
    Oct 2000
    Location
    South Africa
    Posts
    372
    Thanks, just what I was looking for

Posting Permissions

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



Click Here to Expand Forum to Full Width