Skip to main content

Data Formats ( XML & JSON ) XML AND JSON | Generate XSD For Mobile Store

 

Generate XSD For Mobile Store

<?xml version="1.0" encoding="UTF-8"?>

<mobilestore>

<mobile>

<brand>Nokia</brand>

<os>Symbian</os>

<model>C6</model>

<ram>1gb</ram>

<internal>8gb</internal>

</mobile>

<mobile>

<brand>Samsung</brand>

<os>Android</os>

<model>Galaxy</model>

<ram>2gb</ram>

<internal>8gb</internal>

</mobile>

<mobile>

<brand>Sony</brand>

<os>Android</os>

<model>Experia</model>

<ram>512mb</ram>

<internal>16gb</internal>

</mobile>

</mobilestore>



<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
 attributeFormDefault="unqualified">
<xs:element name="mobilestore">
<xs:complexType>
    <xs:sequence>
        <xs:element name="mobile" maxOccurs="unbounded">
            <xs:complexType>
            <xs:sequence>
            <xs:element name="brand" type="xs:string"/>
            <xs:element name="os" type="xs:string"/>
            <xs:element name="model" type="xs:string"/>
            <xs:element name="ram" type="xs:string"/>
            <xs:element name="internal" type="xs:string"/>
            </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


Evaluation Result:


 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
|  1  test run/ 1  test passed |
+------------------------------+

Comments

Must Read:

Programming using Java Hands On - Arrays | Find & Display the position of a number

  Write a java program to find the given number from the array of elements and display its position. If the number is not present in an array then display it as 0. Assume the position starts from 1. Sample Input 1 Enter the array size 4 Enter the values 9 32 17 4 Enter the number to find 17 Sample Output 1 3 Sample Input  2 Enter the array size 3 Enter the values 29 53 11 Enter the number to find 49 Sample Output  2 0 Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ |4 tests run / 4 tests passed | +------------------------------+ TEST CASE PASSED

RDBMS Data Definition Language | Create Distributor table

  Write a query to create Distributor table with constraints mentioned.  Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

RDBMS Data Definition Language | Create Mobile_master table

  Write a query to create Mobile_master table with constraints mentioned.  Refer the below schema  Result Description Summary of tests +------------------------------+ | 3 tests run / 3 test passed | +------------------------------+

Programming using Java Hands On - Control Structures | Income Calulation

Income Calculation In a company named Micky software solution, many part-time employees are working for a pay of Rs. 100 per hour. Write a program to calculate the total amount an employee earns in a year by working part time. Consider employees should work all day in the year and year has 365 days. Note : The hour should be a positive value less than or equal to 24, if fails display "Unable to calculate the earnings" Sample Input 1: Enter no of hours worked in a day:3 Sample Output   1 : Total income in a year:109500 Sample Input 2: Enter no of hours worked in a day:-5 Sample Output   2 : Unable to calculate the earnings Result Description Summary of tests *Note: All the test cases might not have same weightage +------------------------------+ | 6 tests run/ 6 tests passed | +------------------------------+

Programming using Java Hands On - Control Structures | Triangle Validation

  Triangle Validation Tom  is given an assignment by this teacher.  He provides him the length of the sides of a triangle and  asks if they form the sides of the triangle. If yes, the output should be , “Sides form a Triangle”.  If not, the output should be “Sides does not form a Triangle”.  All the sides should be greater than zero.  If any side is less than or equal to zero the output should be “Invalid Input”.  Note :  The rule for a triangle is sum of the length of any two sides [taken in any manner] of a triangle should be greater than the length of the third side.  Sample Input 1: Enter the value for side1   6 Enter the value for side2    4 Enter the value for side3    5 Sample Output 1 Sides form a Triangle Sample Input 2: Enter the value for side1    6 Enter the value for side2    12 Enter the value for side3    5 Sample Output 2: Sides does not form a Triangle Result D...

Software Engineering Concepts Basics Of Testing Basics Of Testing | Quiz 2

Software Engineering Concepts  Basics Of Testing  Basics Of Testing Quiz 2

Inverted Pattern

  /* @ToDo  Inverted Pattern 1   2   3   4   5    1   2   3   4    1   2   3    1   2    1    */ #include   <iostream> using   namespace   std ; int   main (){       #ifndef  ONLINE_JUDGE          freopen ( "../asset/input.txt" , "r" , stdin );          freopen ( "../asset/output.txt" , "w" , stdout );     #endif     // Code here!!      int   n ;  cin >> n ;      for ( int   i = 0 ; i < n ; i ++){          for ( int   j = 1 ; j <= n - i ; j ++)  ...

DH ASE B3 Slot 3 Mock 1 - Quiz

 DH ASE B3       Slot 3            Mock 1                 Quiz

Count A+b+c+ Subsequences

 1. You are given a string str. 2. You are required to calculate and print the count of subsequences of the nature a+b+c+. For abbc -> there are 3 subsequences. abc, abc, abbc For abcabc -> there are 7 subsequences. abc, abc, abbc, aabc, abcc, abc, abc. Input Format A string str Output Format count of subsequences of the nature a+b+c+ Constraints 0 < str.length <= 10 Sample Input abcabc Sample Output 7 Solution: import java.io.*; import java.util.*; public class Main {     public static void main(String[] args) throws Exception {         Scanner sc = new Scanner(System.in);         String str = sc.nextLine();         int counta = 0, countb = 0, countc = 0;         for(int i=0;i<str.length();i++){             char ch = str.charAt(i);             if(ch == 'a')                 ++coun...

Subscribe to Get's Answer by Email