Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

# and XML Attributes 2

Status
Not open for further replies.

BoulderBum

Programmer
Joined
Jul 11, 2002
Messages
2,179
Location
US
Can you legally use '#' in an attribute in XML?

For example:

<someElement someAttribute="some # value"/>

Apparently a Web Service we use didn't like the '#' character when used in an address. The service has been known to be a bit quirky in the past, however (we suspect they're hand-coding their parsing instead of using any API), so I want to determine if this is a mistake THEY should be looking into, or something WE botched.
 
The # is not one of xml's five predefined entities, so it should not of any concern as an attribute. Seems to check well-formedness just fine with # as the attribute.
 
I've never had a problem using it as a value.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
K. You guys were right, it was just a bug on "their" end.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top