473,386 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

xml element names...

hi all,

xml element names doesn't support names with whitespaces or symbol
characters etc,... but is there any .NET class that can help convert these
characters like hex form.... that is what XmlSchema does.
Would hate to have to find these characters one at a time...

thanks,
Nov 12 '05 #1
2 1118
System.Convert ?
Or just do
foreach(char Ch in ForbiddenChars)
ClassName = ClassName.Replace(Ch,((int)Ch).ToString("X"));//You may have to
cast the Ch to string, though
that will convert a char to hex.

"Maersa" <ma*****@hotmail.com> wrote in message
news:eo**************@TK2MSFTNGP11.phx.gbl...
hi all,

xml element names doesn't support names with whitespaces or symbol
characters etc,... but is there any .NET class that can help convert these
characters like hex form.... that is what XmlSchema does.
Would hate to have to find these characters one at a time...

thanks,

Nov 12 '05 #2
Maersa,
Have you tried either the EncodeName, EncodeLocalName, or EncodeNmToken
functions in the System.Xml.XmlConvert class?

Reading the description of EncodeName & EncodeLocalName its obvious what
they do, however its not obvious how they differ from EncodeNmToken.

Hope this helps
Jay
"Maersa" <ma*****@hotmail.com> wrote in message
news:eo**************@TK2MSFTNGP11.phx.gbl...
hi all,

xml element names doesn't support names with whitespaces or symbol
characters etc,... but is there any .NET class that can help convert these
characters like hex form.... that is what XmlSchema does.
Would hate to have to find these characters one at a time...

thanks,

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Honza Pazdziora | last post by:
Hello, I'm processing documents that can have any element names in them. The only restriction is placed on the attributes of these elements, each of them can only have two attributes of given...
2
by: Matt | last post by:
Is it possible to traverse the values of children of an element, and no need to specify the children's element names in XSLT element? The XML file can be <bio> <skills> <languages>...
9
by: Derek Basch | last post by:
I have a simple XHTML document that I would like to apply javascript functionality to: <body> <div class="length">9</div> <div class="sequence">AAAAAAATTTAAA</div> <div...
2
by: Tom Kerigan | last post by:
I know that longer element names increase the size of an XML document, ultimately resulting in a larger amount of data at parse-time. Is there anything else, specifically related to an element name...
4
by: bienwell | last post by:
Hi all, Data displayed on the datalist control is bound by the column name of the dataset like this : <%# DataBinder.Eval(Container.DataItem, "title")%> Could I use an element of the array...
4
by: ina | last post by:
Hello all, I am newbie in xml and have a problem with this parse. I have this xml.file <Style> <Strategy>
2
by: UpgradeMyBrain | last post by:
Hi. Does anyone know how to take an input XML file, extract just a section of the element name and generate a new element name with part of that name? Example: Input file contains: <Names>...
6
by: adurth | last post by:
Hi! Is there any function that converts a string containing characters that are invalid for use in an element name to a valid one? Thanks, Andreas
9
by: Mark Olbert | last post by:
I'm trying to serialize (using XmlSerializer.Serialize) a class that I generated from an XSD schema using XSD.EXE /c. The problem I'm running into is that the root element needs to be unqualified,...
8
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.