Ashish Soni

Greenhorn
+ Follow
since May 25, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ashish Soni

Thanks a lot , but i am just searching and got to know this from w3schools website and not sure how this works

http://www.w3schools.com/schema/schema_simple.asp




Ashish
Hi All ,

I have below xml schema in which i specified a default value for one of the choice , but when i pass a xml without below tags i am not getting the default value , Can some one please help me as how the default value works in XML schema


Thanks,
Ashish Soni
hi all,

Just wanted to know if below XSD is valid or not.

<xs:complexType name="ComplexType1">
<xs:choice>
<xs:element name="ele1" type="xs:string" minOccurs="0" />
<xs:element name="ele2" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:choice>
<xs:element name="ele3" type="xs:string" minOccurs="0" />
<xs:element name="ele4" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>

</xs:complexType>

Please help
Regards,
Ashish
Hi All ,

I want to send list of countries in XML , Please can some one give a example how can i define a XSD schema and what would be the input xml like.

Thanks,
Ashish
Hi All ,

I have a JavaBean name MyInfo which is mentioned below

public class MyInfo implements Serializable
{
private Map inputDetails = null;
private Collection selectedOrganization = null;
....
....

}

the elements inputDetails is a Map and contains different object using a key value pair

Can some one please let me know how i can map this object in XSD schema .

Thanks,
16 years ago
How can i do below validation using commons validator

If Field-1 is not null then either Field-2 is required or Field-3 is required. I am able to do for two fields using validwhen but not for three fields.

Please help.

Ashish
16 years ago
Also i destroyed that material.
I apologies, but i don't have idea that it that material.
I am going through one of the mock test and got the question about [ some class name ] , I tried searching google and java documentation but not able to find this interface , Can some one let me know if this type of interface exist and if it is where can i found more details.

Thanks,
Ashish
[ July 13, 2008: Message edited by: Ulf Dittmer ]
Hi

I am struggling to understand this , Please explain

import java.util.regex.*;
class Regex2 {
public static void main(String[] args) {
Pattern p = Pattern.compile(args[0]);
Matcher m = p.matcher(args[1]);
boolean b = false;
while(b = m.find()) {
System.out.print(m.start() + m.group());
}
}
}
And the command line:
java Regex2 "\d*" ab34ef
What is the result?
A. 234
B. 334
C. 2334
D. 0123456
E. 01234456
F. 12334567

The ans is E , But how ? i know that \d* means 0 to many occurence but where and when ,some one Please explain.

Ashish
Thanks i got it now.
Can some one clear below output , i am preety much confused ( From KB book)

import java.util.regex.*;
class Regex {
public static void main(String [] args) {
Pattern p = Pattern.compile(args[0]);
Matcher m = p.matcher(args[1]);
boolean b = false;
System.out.println("Pattern is " + m.pattern());
while(b = m.find()) {
System.out.println(m.start() + " " + m.group());
}
}
}

% java Regex "\d\w" "ab4 56_7ab"

Produces the output
Pattern is \d\w
4 56
7 7a


Please explain how this output is produced.

Ashish
All ,

I found a code mentioned below (http://www.examsguide.com/scjp/freequestions8.html)

if(0.0 == -0.0) {
System.out.println("true");
}
else{
System.out.println("false");
}

this prints true and my understanding is that 0 is neither negative nor positive.

Is there is any other reason also , Pleae explain.


Ashish
Call IBM support and ask them to register you, It can be done only if your company is IBM business partner , and make sure that there are no charges unless you want to pay.

Ashish