|
You can't. It goes against W3C's XML specifications.
|
|
|
|
|
i was looking at the following tutorial's last topic Element Naming.
http://www.w3schools.com/xml/xml_elements.asp
it doesn't say anything about this restriction.
Shajeel
|
|
|
|
|
Hi there.
Look at section 2.3 of the XML specifications[^]
Of particular interest are rules 4 and 5 which specifies the valid range of XML element names.
Quoting from the Specification:
Names and Tokens
[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender
[5] Name ::= (Letter | '_' | ':') (NameChar)*
[6] Names ::= Name (#x20 Name)*
[7] Nmtoken ::= (NameChar)+
[8] Nmtokens ::= Nmtoken (#x20 Nmtoken)*
Both IE and Firefox have XML support, so you could create an XML file containing the element and display the file in the software. It will perform a well-formed check on files with an .xml extension and will return any errors encountered.
Regards, Graham.
-- modified at 13:07 Tuesday 25th April, 2006
|
|
|
|
|
Thanks for the help.
Shajeel
|
|
|
|
|
Shajeel wrote: it doesn't say anything about this restriction.
Ha! Tricky isn't it...
(Taken from http://www.w3schools.com/xml/xml_elements.asp)
XML elements must follow these naming rules:
* Names can contain letters, numbers, and other characters
* Names must not start with a number or punctuation character
* Names must not start with the letters xml (or XML, or Xml, etc)
* Names cannot contain spaces
belive it or not, '/' (slash) is a punctuation character.
edit: oops, it says only at beginning. So they do miss this rule.
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
-- modified at 7:15 Wednesday 26th April, 2006
|
|
|
|
|
it is just saying names must not start with punctuation, i wasnt starting name with /, i want to just use it like < I / O > and first rule says it can contain other characters.
Shajeel
|
|
|
|
|
|
Hi. I'm using the xsd.exe utility to auto-generate C# classes for my .NET project from an XSD file. The "service" I am using does not have a WSDL, so generating proxy classes from wsdl.exe is not an option.
Does anyone have any experience using the auto-generated classes from xsd.exe? My problem is that in the XSD, I have a complex data entity that is of "type" such and such, and therefore, is not generated as it's own class.
The XSD defines a "complexType_decisionEngineRequest" like this:
<xs:complextype name="complexType_decisionEngineRequest">
<xs:complexcontent>
.
.
.
and later on, a "decisionEngineServiceRequest" element is defined of TYPE "complexType_decisionEngineRequest" like this:
<xs:element name="decisionEngineServiceRequest" type="complexType_decisionEngineRequest">
What xsd.exe ends up generating is a class for the "complexType_decisionEngineRequest", but not a class for the "decisionEngineServiceRequest", which is what I want for my XML base tag. I wish to declare these classes such that my XML that is serialized looks like this:
<decisionengineservicerequest>
....
My question is, is this a case where I should just give up and write my own class, or is there a way to do this with the auto-generated classes from xsd.exe?
Anyone have a similar experience?
|
|
|
|
|
Woops, guess I can't include the XML source!
try again...
Hi. I'm using the xsd.exe utility to auto-generate C# classes for my .NET project from an XSD file. The "service" I am using does not have a WSDL, so generating proxy classes from wsdl.exe is not an option.
Does anyone have any experience using the auto-generated classes from xsd.exe? My problem is that in the XSD, I have a complex data entity that is of "type" such and such, and therefore, is not generated as it's own class.
The XSD defines a "complexType_decisionEngineRequest" like this:
<xs:complexType name="complexType_decisionEngineRequest">
<xs:complexContent>
.
.
.
</xs:complexContent>
</xs:complextType>
and later on, a "decisionEngineServiceRequest" element is defined of TYPE "complexType_decisionEngineRequest" like this:
<xs:element name="decisionEngineServiceRequest" type="complexType_decisionEngineRequest" />
What xsd.exe ends up generating is a class for the "complexType_decisionEngineRequest", but not a class for the "decisionEngineServiceRequest", which is what I want for my XML base tag. I wish to declare these classes such that my XML that is serialized looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<decisionEngineServiceRequest>
....
</decisionEngineServiceRequest>
My question is, is this a case where I should just give up and write my own class, or is there a way to do this with the auto-generated classes from xsd.exe?
Anyone have a similar experience?
|
|
|
|
|
michaelhardeman wrote: Woops, guess I can't include the XML source!
You can, but you must check "Ignore HTML tags in this message (good for code snippets)".
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hi all,
I have a xml file and a xsl-fo file and i want to create a pdf with them. It works but... nothing displays as it should. I've tried to figure it out on my own the whole week but no luck.
please if you know anything about fop just reply to me and i'll email you the xml file and xsl-fo file.
Thank you in advance
He who laughs last...
|
|
|
|
|
Hi
I have all the XSL files stroed in oracle datbase and i want ot transform on the fly . i fetch dataset and convert into XMl then i want to apply the XSL a stream in Dataset to theis XML can it be done without creating a physical file on the disk?
sss
|
|
|
|
|
Hi,
I have a very huge XML file ( around 30 MB in size)..
The problem is i need to search nodes( many of them, basically BFS)
XML file contains data in linear fashion..
now searhing around 30,000 nodes takes long time...
can any one suggest which class could i use here to obtain faster results..
i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose...
probably some code snippets supporting your answer would be of great help
Thanks
techno_adi
-- modified at 11:33 Thursday 20th April, 2006
|
|
|
|
|
That's a large amount of XML data! Since its such a large file, I would advise against using XmlDocument or DataSet which will load the entire data into memory. Instead you need to use an XmlReader, which only provides one way access to maximise performance.
I'll quote from MSDN: "Represents a reader that provides fast, non-cached, forward-only access to XML data.".
|
|
|
|
|
Speaking from personal experience, I would suggest moving the data to a database instead of using XML files that are that large. I did a project that started out by having a pure XML backend but as the files grew I ran into the same problem you are having. We ended up using Access for simplicity and later moved to MySQL because it was a free database our clients could run.
Just my 2 cents.
-Richard
|
|
|
|
|
I think you might want to look at vtd-xml
it is ideally designed to do what you described..
|
|
|
|
|
I have an sql table with products
each products owns its categorypath in the category field
ex: columns
item | categoryPath
product1 | cat1 > subcat1 > subsubcat2
product2 | cat1 > subcat1 > subsubcat3
product3 | cat2 > subcat2 > subsubcat1
... so on
how can i generate a xml-tree from the column categorypath ?
like:
<node>cat1
<node>subcat1
<node>subsubcat2</node>
</node>
<node>subcat1
<node>subsubcat3</node>
</node>
</node>
...etc.
anyone help, thank'
starlight71 needs help
|
|
|
|
|
Hi
I need XML schema validation uing xsd file in DOM using MSXML 3.0, Is there any way to validate XML using XSD in MSXML 3.0 ? ,I need code in VC++ or c++.
Please help me
by
Prabhakar.M
Prabhakar.M
|
|
|
|
|
No, I researched this recently.
The support in MS XML 3.0 is for something called XDR.
You need to use MS XML 4.0 or later to validate using XSD.
What would fail on trying to add a schema to schema cache in 3.0 with a 'root node is bad blah blah blah...' exact same code modified to use 4.0 added to schema cache and validated without error.
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|
|
Hi
I am working on ASP.NET, i have data both for XML and XSL stored in oracle 10g database
I have a dataset which (will eventually be the XML)
I laso have data from output cursor which is the XSL, now can i pass the dataset as a xsl like i pass Dataset for a XML file? how do i acheive it
If not how to transfer the XSL data to a physical file and then i can use to transform.
sss
|
|
|
|
|
Hello,
We are building a windows desktop application using C#
that reads in an xml file, to create a user interface.
The user then enters values into the user interface.
We want to be able to save an xml file with the same
schema as the original xml file, but with the users
entered values into it.
Here is a simple example as part of input document:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue></choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
We would want the output document to contain:
<label>
<name>Needs Cleaning</name>
<type>radio</type>
<value>
<choicelist>yes</choicelist>
<choicevalue>yes</choicevalue>
<choicelist>no</choicelist>
<choicevalue></choicevalue>
</value>
</label>
or perhaps
<label>
<name>Needs Cleaning</name>
<type>text</type>
<value>
<single>yes</single>
</value>
</label>
We aren't too adept at xmlTextReaders and xmlTextWriters yet,
and have been doing some research in Google.
There was an interesting article that seemed pertinent to this, but
it dealt with C++ :
http://www.codeproject.com/csharp/dcinsertxml.asp
Any help would be appreciated.
Thank you!
Anne
|
|
|
|
|
|
|
Lookup usage of the "innerxml" property of the entry elements when recieving the returned data.
"Every new day begins with possibilities. It's up to us to fill it with things that move us toward progress and peace.” (Ronald Reagan)
|
|
|
|
|
Hi
Any one know how to validate xsd to xml in vbscript. Is it possible. If it possible, can i check each node while entering the data. for example i have 2 child element like customerid, customername, while entering customerid it check wether entered data is numeric. can i get any exception or parser error if user enter wrong data.
Can any one tell how i can transfer server side xml data to client side. I expect better ideas from members
Regards
Maxi
maximasshel@hotmail.com
Maximasshel
|
|
|
|