Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 326091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:16:38+00:00 2026-05-12T09:16:38+00:00

I am designing XML for some custom logging. There’s a part in the logger

  • 0

I am designing XML for some custom logging. There’s a part in the logger where the developer can add name-value pairs to the log. I’m trying to decide how the XML should look. I’m trying to decide whether the name portion of the name value pair should be an attribute. (I think so). Here’s what I have so far:


<ExtendedProperties>
   <ExtendedProperty name="Name1">Value1</ExtendedProperty>
   <ExtendedProperty name="Name2">Value2</ExtendedProperty>
</ExtendedProperties

The other option (that I know of) is to make the value name the node name:

<Name1>Value1</Name1>
<Name2>Value2</Name2>

I like the first method (attribute based) better because I can more easily describe the document with XSD, and I can see how you could use xpath or xquery to access all of the elements of type “ExtendedProperty”. (The available names are not predefined — they could be anything. )

However, I don’t spend much time developing XML schemas. Does that look right to you guys? Is there anything else that I might want to consider?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:16:38+00:00Added an answer on May 12, 2026 at 9:16 am

    The available names are not predefined
    — they could be anything.

    This makes it impossible to use the 2nd form (with xml-schema) – since you need to know all the valid names using that method

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a dialect of XML for defining the tables, indexes and relations of
When designing a collection class, is there any reason not to implement locking privately
In designing any desktop applications, are there any general rules on how much memory
When designing a ASP.net WebForm application what are some important steps to take (or
Designing a new system from scratch. I'll be using the STL to store lists
When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to
When designing a database to use MVCC (Multi-Version Concurrency Control), you create tables with
While designing a table my colleague here says that I should avoid identity column
When designing user table what would be the must have fields from the security/user
When designing a lookup table (enum) in SqlServer 2005, if you know the number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.