J
J
Jsman2017-03-30 12:04:02
Java
Jsman, 2017-03-30 12:04:02

How to parse SAXBuilder?

Guys, tell me please, I don’t understand how to parse SAXBuilder.
I send a post request, after which I receive a response (in xml), collect the response in StringBuffer x.
Now x contains:

"<?xml version="1.0"?>
<company>
  <staff>
    <firstname>yong</firstname>
    <lastname>mook kim</lastname>
    <nickname>mkyong</nickname>
    <salary>100000</salary>
  </staff>
  <staff>
    <firstname>low</firstname>
    <lastname>yin fong</lastname>
    <nickname>fong fong</nickname>
    <salary>200000</salary>
  </staff>
</company>"

I do not understand how to process this answer with this library. It would be great if someone could explain how to display the contents of staff.
PS I searched on Google for a long time and then they blocked me there.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question