title: How to read data from xml in postgresql function?
body: <p>how to read the xml data in postgresql stored procedure.and how to send data through xml and call stored procedure in java.</p>
  
  <p>i can read the xml data through <strong><em>sqlserver</em></strong> but same thing i use in postgres stored procedure like</p>
  
  <pre><code>insert into temp_StudentDetails (studentId, studentFirstName, studentMiddleName, studentLastName, dateOfBirth, emailId, mobileNumber, landlineNumber, courseId, yearId, cityIdPass, stateIdPass, addressId)
      SELECT 
          Tab.Col.value('(studentId)[1]', 'bigint' ),
          Tab.Col.value('(studentFirstName)[1]', 'character varying(50)'),
          Tab.Col.value('(studentMiddleName)[1]', 'character varying(50)'),
          Tab.Col.value('(studentLastName)[1]', 'character varying(50)'),
          Tab.Col.value('(dateOfBirth)[1]', 'date'),
          Tab.Col.value('(emailId)[1]', 'character varying(50)'),
          Tab.Col.value('(mobileNumber)[1]', 'character varying(50)'),
          Tab.Col.value('(landlineNumber)[1]', 'character varying(50)'),
          Tab.Col.value('(courseId)[1]', 'BIGINT'),
          Tab.Col.value('(yearId)[1]', 'BIGINT'),
          Tab.Col.value('(cityIdPass)[1]', 'BIGINT'),
          Tab.Col.value('(stateIdPass)[1]', 'BIGINT'),
          Tab.Col.value('(addressId)[1]', 'BIGINT')
  
          from p_studentDetailsXML.nodes('/Root/StudentDetails') Tab(Col);
  </code></pre>
  
  <p>and How to make it  work in <strong>postgresql</strong> function?</p>
  
  <p>Any help?</p>