XML Attributes-VBForums
Results 1 to 4 of 4

Thread: XML Attributes

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    321

    XML Attributes

    Hi

    Can someone please explain what the prupose of and XML attribute is? For example,

    Code:
    <family address="1 London Road">
    would be the same as a value within an Element i.e.

    Code:
    <address>1 London Road</address>.
    So what is the purpose of an attribute in this case?

    Many Thanks

  2. #2
    PowerPoster
    Join Date
    May 2002
    Posts
    25,319

    Re: XML Attributes

    In that case it's basically the same thing... the difference is in how you read/write the information.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    321

    Re: XML Attributes

    Quote Originally Posted by techgnome View Post
    In that case it's basically the same thing... the difference is in how you read/write the information.

    -tg
    Great Thanks!

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,757

    Re: XML Attributes

    Check out this screen shot of a really complicated XML file I have to produce for transmission to another software platform.

    They use lots of attribute values - seems they use them to "describe" what might be contained within - note the NAME TYPE - I'm guessing a different value in that attribute would require something other than the LAST NAME, FIRST NAME that follows within...
    Attached Images Attached Images  

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.