title: how i get all data from firebase realtime database
body: <p>I have a database with this schema:</p>
  
  <p><a href="https://i.stack.imgur.com/sghKu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sghKu.png" alt="enter image description here"></a></p>
  
  <p>I tested this code but I can't get any msg from the database.  I would appreciate your help.</p>
  
  <pre><code> private void Add_Chat(final DataSnapshot dataSnapshot) {
          root.child("ChatSpace").addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(DataSnapshot snapshot) {
                  String nom=dataSnapshot.child("ChatSpace").child("msg").getValue(String.class);
                  System.out.println(nom);  //prints "Do you have data? You'll love Firebase."
              }
              @Override
              public void onCancelled(DatabaseError databaseError) {
              }
          });
      }
  </code></pre>