Advertisement
noam76

XML function

Feb 23rd, 2021 (edited)
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void handleXML(){
  2.   XML="<?xml version='1.0'?>";
  3.   XML+="<xml>";
  4.   XML+="<pumpstate>";
  5.   XML+= pumpstate;
  6.   XML+="</pumpstate>";
  7.   XML+="<sensor0>";
  8.   XML+= sensor[0];
  9.   XML+="</sensor0>";  
  10.   XML+="<sensor1>";
  11.   XML+= sensor[1];
  12.   XML+="</sensor1>";
  13.   XML+="<sensor2>";
  14.   XML+= sensor[2];
  15.   XML+="</sensor2>";
  16.   XML+="<sensor3>";
  17.   XML+= sensor[3];
  18.   XML+="</sensor3>";
  19.   XML+="<sensor4>";
  20.   XML+= sensor[4];
  21.   XML+="</sensor4>";
  22.   XML+="<sensor5>";
  23.   XML+= sensor[5];
  24.   XML+="</sensor5>";
  25.   XML+="<sensor6>";
  26.   XML+= sensor[6];
  27.   XML+="</sensor6>";
  28.   XML+="<sensor7>";
  29.   XML+= sensor[7];
  30.   XML+="</sensor7>";
  31.   XML+="<sensor8>";
  32.   XML+= sensor[8];
  33.   XML+="</sensor8>";
  34.   XML+="<sensor9>";
  35.   XML+= sensor[9];
  36.   XML+="</sensor9>";
  37.   XML+="<sensor10>";
  38.   XML+= sensor[10];
  39.   XML+="</sensor10>";
  40.   XML+="<sensor11>";
  41.   XML+= sensor[11];
  42.   XML+="</sensor11>";
  43.   XML+="<sensor12>";
  44.   XML+= sensor[12];
  45.   XML+="</sensor12>";
  46.   XML+="<sensor13>";
  47.   XML+= sensor[13];
  48.   XML+="</sensor13>";
  49.   XML+="<sensor14>";
  50.   XML+= sensor[14];
  51.   XML+="</sensor14>";
  52.   XML+="<sensor15>";
  53.   XML+= sensor[15];
  54.   XML+="</sensor15>";
  55.   XML+="<solenoidState0>";
  56.   XML+= solenoidState0;
  57.   XML+="</solenoidState0>";
  58.   XML+="<solenoidState1>";
  59.   XML+= solenoidState1;
  60.   XML+="</solenoidState1>";
  61.   XML+="<solenoidState2>";
  62.   XML+= solenoidState2;
  63.   XML+="</solenoidState2>";
  64.   XML+="<solenoidState3>";
  65.   XML+= solenoidState3;
  66.   XML+="</solenoidState3>";
  67.   XML+="<solenoidState4>";
  68.   XML+= solenoidState4;
  69.   XML+="</solenoidState4>";
  70.   XML+="<solenoidState5>";
  71.   XML+= solenoidState5;
  72.   XML+="</solenoidState5>";
  73.   XML+="<solenoidState6>";
  74.   XML+= solenoidState6;
  75.   XML+="</solenoidState6>";
  76.   XML+="<solenoidState7>";
  77.   XML+= solenoidState7;
  78.   XML+="</solenoidState7>";
  79.   XML+="<solenoidState8>";
  80.   XML+= solenoidState8;
  81.   XML+="</solenoidState8>";
  82.   XML+="<solenoidState9>";
  83.   XML+= solenoidState9;
  84.   XML+="</solenoidState9>";
  85.   XML+="<solenoidState10>";
  86.   XML+= solenoidState10;
  87.   XML+="</solenoidState10>";
  88.   XML+="<solenoidState11>";
  89.   XML+= solenoidState11;
  90.   XML+="</solenoidState11>";
  91.   XML+="<solenoidState12>";
  92.   XML+= solenoidState12;
  93.   XML+="</solenoidState12>";
  94.   XML+="<solenoidState13>";
  95.   XML+= solenoidState13;
  96.   XML+="</solenoidState13>";
  97.   XML+="<solenoidState14>";
  98.   XML+= solenoidState14;
  99.   XML+="</solenoidState14>";
  100.   XML+="<solenoidState15>";
  101.   XML+= solenoidState15;
  102.   XML+="</solenoidState15>";
  103.   XML+="</xml>";
  104.  server.send(200,"text/xml",XML);
  105. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement