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

  • Home
  • SEARCH
  • 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 850307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:14:37+00:00 2026-05-15T07:14:37+00:00

The XML schema I’m working with has specific character lengths for strings. So I

  • 0

The XML schema I’m working with has specific character lengths for strings. So I may have a string that’s like:

"Jim & Mary"

which is 10 chars in C# but when it is written to xml it becomes:

"Jim & Mary"

If an XML schema said the string could only be a max of 10 chars. Would this string pass?

If not, how can I test in C# for the string length as it would appear in XML?

Thanks for any help.

  • 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-15T07:14:38+00:00Added an answer on May 15, 2026 at 7:14 am

    I reach the same conclusion as Matt (& is a single character), but based on the standards. The XML standard states that before validation, attribute values must be normalized, which includes entity replacement.

    Also see the Treatment of Entities section, which states that they would be “Included” whether they were part of content or inside attribute values. “Included” has this meaning: “its replacement text is retrieved and processed, in place of the reference itself, as though it were part of the document at the location the reference was recognized”.

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

Sidebar

Related Questions

I have an XML Schema that looks like this: <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element name=root> <xs:complexType>
I have an existing XML schema that contains a type that I would like
I have an XML Schema element like this: <xs:element type=xs:string name=IsActive minOccurs=0> </xs:element> I'm
I have an XML Schema that mostly makes sense, but I encountered a bit
I have an XML schema: <xsd:element name=Person> <xsd:complexType> <xsd:sequence> <xsd:element name=name type=xsd:string /> <xsd:element
I'm defining an xml schema for a file that looks something like this: <data>
In using XML Schema 1.1, I'd like to define an attribute group that occurs
I have an XML schema that I need to extract values from but I
I have a custom XML schema defined for page display that puts elements on
If you have an XML schema which dictates an element has a default value,

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.