package org.maskat.demo.databinding.gr1_bt1.vo;

import java.io.BufferedReader;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.maskat.demo.AbstractValueObj;

public class ValueObj extends AbstractValueObj {

  public ValueObj(HttpServletRequest req) {
    super(req);

    try {
      BufferedReader reader = new BufferedReader(req.getReader());
      String line = null;
      String xml = "";
      while ((line = reader.readLine()) != null) {
        xml += line;
      }
      System.out.println(xml);
    } catch (IOException e) {
      e.printStackTrace();
      return;
    }

  }

  public String tempGetXML() {
    return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><maskat><rows>"
           + "<row><col1>セル1_1</col1><col2>セル1_2</col2><col3>セル1_3</col3></row>"
           + "<row><col1>セル2_1</col1><col2>セル2_2</col2><col3>セル2_3</col3></row>"
           + "<row><col1>セル3_1</col1><col2>セル3_2</col2><col3>セル3_3</col3></row>"
           + "<row><col1>セル4_1</col1><col2>セル4_2</col2><col3>セル4_3</col3></row>"
           + "</rows></maskat>";
  }

}
