Solved

XML Schema alphanumeric

Posted on 2008-09-30
3
1,831 Views
Last Modified: 2012-05-05
I am designing an XML schema. Below is how i can restrict on element to string only. How can restrict the element to alphanumeric?  


                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                              <xs:pattern value="\[.+\].*"/>
                        </xs:restriction>
                  </xs:simpleType>
0
Comment
Question by:komlaaa
3 Comments
 
LVL 9

Accepted Solution

by:
mbodewes earned 500 total points
ID: 22609634
What does this have to do with Java? This is an XML question only. As the answer is simple, I'll give it here, but please do ask your questions in the correct zone.

Either specify: <"xsd:decimal"/>  or if you are looking for an alphanumeric string, use the regex [0-9]+
0
 

Author Comment

by:komlaaa
ID: 22613818
you sound pist man!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now