android的sax解析XML文档

 

               最近做了一些SAX解析的一些东西,整合了学校的自习室的情况,目的是为那些考研亦或是想学习的童鞋提供一些简单的帮助

一、.首先布局一下所要设计的界面

1  第一个界面的布局

 

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/bg"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/bg"
    
   
     >
<LinearLayout
    android:layout_width="fill_parent"
        android:layout_height="30dp"
        android:gravity="center">
  <TextView
            android:layout_width="wrap_content"
            android:layout_height="30dp"
            android:text="南阳理工学院自习室"
            android:gravity="center_horizontal"
            android:textSize="25dp" /> 
            
</LinearLayout>
  <ListView
        android:id="@+id/self_revision_roomlist"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center_horizontal"
        android:scrollbars="vertical"
        android:layout_marginTop="38dp"
        
        />


</RelativeLayout>

 

 

 

 

 

 

2.第一个界面的listView布局academylist.xml

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="200dp" android:layout_height="80dip"
android:layout_toLeftOf="@+id/linerlayout_imagebutton"
    android:orientation="horizontal"
    android:layout_marginLeft="20dp"
     
android:layout_marginTop="10dp"> 
<ImageView android:id="@+id/image" 
    android:layout_width="80dip"
android:layout_height="90dip" />
<LinearLayout
    android:layout_width="200dp"
android:layout_height="90dip" 
android:layout_toLeftOf="@+id/linerlayout_imagebutton"
android:orientation="vertical" 
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp">
 <TextView 
   android:id="@+id/academy"
   android:layout_width="wrap_content"
android:layout_height="wrap_content" 
android:textColor="#FF0000"

/>
 <TextView 
    android:id="@+id/classroom"
    android:layout_width="wrap_content"
android:layout_height="wrap_content" 
android:textColor="#EEEE00" 
/>
<TextView 
   android:id="@+id/opentime"
   android:layout_width="wrap_content"
android:layout_height="wrap_content" 

/>





</LinearLayout>
</LinearLayout>

 

 

 

 

 

---------3.第二个界面的详细布局academy.xml

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" 
    android:id="@+id/bg1"
     android:background="@drawable/bg1">


    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="30dp"
        android:gravity="center"
        android:orientation="horizontal" >


        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="自习室详细信息"
            android:textColor="#FFF"
            android:textSize="20dp" />
    </LinearLayout>


    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:orientation="horizontal" >


        <ScrollView
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" >


            <LinearLayout
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="vertical" >


                <TextView
                    android:id="@+id/academyinfo"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:textSize="20dp" 
                    android:textColor="#FF0000"/>


                <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />


                <TextView
                    android:id="@+id/classroominfo"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#EEEE00" />


                <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />


                <TextView
                    android:id="@+id/opentimeinfo"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" 
                     android:textColor="#7CFC00"/>
                <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/monday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#00FFFF" />
                  <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/tuesday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#7D26CD" />
                 <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/wednesday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#CD69C9"  />
                <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/tureday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#AAAAAA" />
                  <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/friday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" 
                    android:textColor="#836FFF"/>
                  <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/sarturday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" 
                    android:textColor="#0000EE"/>
                <View
                    android:id="@+id/vHDivider2"
                    android:layout_width="fill_parent"
                    android:layout_height="1.0dip"
                    android:layout_centerVertical="true"
                    android:background="@drawable/horizontal_separation_line" />
                <TextView
                    android:id="@+id/sunday"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#D02090" />
            </LinearLayout>
        </ScrollView>
    </LinearLayout>


</LinearLayout>

 

 

 

 

 

二、要编辑一下Activity的内容

1、主活动SelfRevisioRoomActivity

 

package com.wang;


import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;


import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;


import org.w3c.dom.Text;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;






import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;


public class SelfRevisioRoomActivity extends Activity {
private ListView listView;
private MyAdapter adapter = null;
List<Self_Revision> list = new ArrayList<Self_Revision>();
private int images[]={R.drawable.b1,R.drawable.b2,R.drawable.b3,R.drawable.b4,
R.drawable.b5,R.drawable.b6,R.drawable.b7,R.drawable.b8,R.drawable.b9,
R.drawable.b10,R.drawable.b11,R.drawable.b12,R.drawable.b13,R.drawable.b14};
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 去除标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
// 设置全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.colledge);
//实例化组件
listView = (ListView) findViewById(R.id.self_revision_roomlist);
// 设置背景的透明度
   View v=findViewById(R.id.bg);
v.getBackground().setAlpha(250);
//声明一个工厂的API 是能够获得应用程序的安装和解析基础的XML文档
SAXParserFactory selffactory = SAXParserFactory.newInstance();
try {
XMLReader reader = selffactory.newSAXParser().getXMLReader();
AcademySax academySax = new AcademySax(list);
reader.setContentHandler(academySax);
InputStream ip = getResources().openRawResource(R.raw.classroom);
reader.parse(new InputSource(ip));



} catch (Exception e) {
e.printStackTrace();
}
adapter = new MyAdapter(this, list);
listView.setAdapter(adapter);

listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
               //定义适配器返回时的回调点击的接口
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub\
Intent intent = new Intent();
// 实现两个Activity 的跳转
intent.setClass(SelfRevisioRoomActivity.this,AcademyRoom.class);
// 输出解析 的信息
intent.putExtra("image", arg2);
intent.putExtra("academy", list.get(arg2).getAcademy());
intent.putExtra("classroom", list.get(arg2).getClassroom());
intent.putExtra("opentime", list.get(arg2).getOpentime());
intent.putExtra("monday", list.get(arg2).getMonday());
intent.putExtra("tuesday",list.get(arg2).getTuesday());
intent.putExtra("wednesday",list.get(arg2).getWednesday());
intent.putExtra("tursday", list.get(arg2).getTursday());
intent.putExtra("friday", list.get(arg2).getFriday());
intent.putExtra("sarturday",list.get(arg2).getSarturday());
intent.putExtra("sunday", list.get(arg2).getSunday());

startActivity(intent);
}
});


}


public final class ViewHolder {
public ImageView image;
public TextView academy;
public TextView classroom;
public TextView opentime;
// public TextView monday;
// public TextView tuesday;
// public TextView wednesday;
// public TextView tursday;
// public TextView friday;
// public TextView sarturday;
// public TextView sunday;


}
//定义一个适配器
public class MyAdapter extends BaseAdapter {


private LayoutInflater myinInflater;
private List<Self_Revision> list;


public List<Self_Revision> getList() {


return list;
}


public MyAdapter(Context context, List<Self_Revision> list) {
this.myinInflater = LayoutInflater.from(context);
this.list = list;
}
// 得到统计是数量
public int getCount() {
// TODO Auto-generated method stub
return list.size();
}


public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}
// 得到列表的ID
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}


public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
// 
holder = new ViewHolder();
convertView = myinInflater.inflate(R.layout.academylist, null);
holder.academy = (TextView) convertView
.findViewById(R.id.academy);
holder.classroom = (TextView) convertView
.findViewById(R.id.classroom);
holder.opentime = (TextView) convertView
.findViewById(R.id.opentime);
//    holder.monday=(TextView)convertView.findViewById(R.id.monday);
//    holder.tuesday=(TextView)convertView.findViewById(R.id.tuesday);
//    holder.wednesday=(TextView)convertView.findViewById(R.id.wednesday);
//    holder.tursday=(TextView)convertView.findViewById(R.id.tureday);
//    holder.friday=(TextView)convertView.findViewById(R.id.friday);
//    holder.sarturday=(TextView)convertView.findViewById(R.id.sarturday);
//    holder.sunday=(TextView )convertView.findViewById(R.id.sunday);
   holder.image=(ImageView)convertView.findViewById(R.id.image);
   convertView.setTag(holder);


} else {
holder = (ViewHolder) convertView.getTag();
}
// 设置各个Item中的组件


holder.academy.setText(list.get(position).getAcademy());
holder.classroom.setText(list.get(position).getClassroom());
holder.opentime.setText(list.get(position).getOpentime());
holder.image.setImageResource(images[position]);
return convertView;
}


}
}

 

 

 

 

 

2、跳转的详细界面的Activity  AcademyRoom

 

package com.wang;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;


public class AcademyRoom extends Activity {
private TextView academy,classroom,opentime,monday,tuesday,wednesday,tursday,friday,sarturday,sunday;
// private ImageView imageView=null;
// private int images[]={R.drawable.b1,R.drawable.b2,R.drawable.b3,R.drawable.b4,
// R.drawable.b5,R.drawable.b6,R.drawable.b7,R.drawable.b8,R.drawable.b9,
// R.drawable.b10,R.drawable.b11,R.drawable.b12,R.drawable.b13,R.drawable.b14};
protected void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);
// 去除标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
// 设置全屏
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.setContentView(R.layout.academy);
Intent intent=null;
intent = getIntent();
//int a=intent.getIntExtra("image",0);
//实例化组件
//this.imageView=(ImageView)findViewById(R.id.image);
this.academy=(TextView)findViewById(R.id.academyinfo);
this.classroom=(TextView)findViewById(R.id.classroominfo);
this.opentime=(TextView)findViewById(R.id.opentimeinfo);
this.monday=(TextView)findViewById(R.id.monday);
this.tuesday=(TextView)findViewById(R.id.tuesday);
this.wednesday=(TextView)findViewById(R.id.wednesday);
this.tursday=(TextView)findViewById(R.id.tureday);
this.friday=(TextView)findViewById(R.id.friday);
this.sarturday=(TextView)findViewById(R.id.sarturday);
this.sunday=(TextView)findViewById(R.id.sunday);
View v=findViewById(R.id.bg1);
v.getBackground().setAlpha(200);
//从意图中获得数据的扩展信息
academy.setText(intent.getStringExtra("academy"));
classroom.setText(intent.getStringExtra("classroom"));
opentime.setText(intent.getStringExtra("opentime"));
monday.setText(intent.getStringExtra("monday"));
tuesday.setText(intent.getStringExtra("tuesday"));
wednesday.setText(intent.getStringExtra("wednesday"));
tursday.setText(intent.getStringExtra("tursday"));
friday.setText(intent.getStringExtra("friday"));
sarturday.setText(intent.getStringExtra("sarturday"));
sunday.setText(intent.getStringExtra("sunday"));
//imageView.setImageResource(images[a]);

}
}

 

 

 

 

 

3、编写AcademySax继承DefaultHandler 

 

 

package com.wang;


import java.util.List;


import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;


public class AcademySax extends DefaultHandler {


private List<Self_Revision> academylist;
private Self_Revision self_revision;
private String tagname;


public AcademySax(List<Self_Revision> academylist) {


super();
this.academylist = academylist;
}
  //接受数据元素以外的字符academy  classroom  opentime
public void characters(char[] ch, int start, int length)
throws SAXException {
String temp = new String(ch, start, length);
if (tagname.equals("academy")) {


self_revision.setAcademy(temp);
} else if (tagname.equals("classroom")) {


self_revision.setClassroom(temp);
} else if (tagname.equals("opentime")) {
self_revision.setOpentime(temp);
} else if (tagname.equals("monday")) {
self_revision.setMonday(temp);
} else if (tagname.equals("tuesday")) {
self_revision.setTuesday(temp);
} else if (tagname.equals("wednesday")) {
self_revision.setWednesday(temp);
} else if (tagname.equals("tursday")) {
self_revision.setTursday(temp);
} else if (tagname.equals("friday")) {
self_revision.setFriday(temp);
} else if (tagname.equals("sarturday")) {
self_revision.setSarturday(temp);
} else if (tagname.equals("sunday")) {
self_revision.setSunday(temp);
}
super.characters(ch, start, length);
}


//接受解析文档元素的结束
public void endDocument() throws SAXException {
// TODO Auto-generated method stub
super.endDocument();
}


//接受解析文档元素的开始
public void startDocument() throws SAXException {
// TODO Auto-generated method stub
super.startDocument();
}


//接受解析文档的开始
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
if (localName.equals("colledge")) {
self_revision = new Self_Revision();
}
tagname = localName;


super.startElement(uri, localName, qName, attributes);
}


//接受解析文档的结束
public void endElement(String uri, String localName, String qName)
throws SAXException {
if (qName.equals("colledge")) {
academylist.add(self_revision);

}
tagname = "";
super.endElement(uri, localName, qName);
}


}

 

 

 

 

 

 

4、建立Self_Revision类

 

 

package com.wang;


public class Self_Revision {


private String academy;
private String classroom;
private String opentime;
private String monday;
private String tuesday;
private String wednesday;
private String tursday;
private String friday;
private String sarturday;
private String sunday;


public String getMonday() {
return monday;
}
public void setMonday(String monday) {
this.monday = monday;
}
public String getTuesday() {
return tuesday;
}
public void setTuesday(String tuesday) {
this.tuesday = tuesday;
}
public String getWednesday() {
return wednesday;
}
public void setWednesday(String wednesday) {
this.wednesday = wednesday;
}
public String getTursday() {
return tursday;
}
public void setTursday(String tursday) {
this.tursday = tursday;
}
public String getFriday() {
return friday;
}
public void setFriday(String friday) {
this.friday = friday;
}
public String getSarturday() {
return sarturday;
}
public void setSarturday(String sarturday) {
this.sarturday = sarturday;
}
public String getSunday() {
return sunday;
}
public void setSunday(String sunday) {
this.sunday = sunday;
}
public  Self_Revision() {
super();
}
public void AcademyRoom(String academy, String classroom,String opentime) {
this.academy = academy;
this.classroom=classroom;
this.opentime=opentime;
}
public String getAcademy() {
return academy;
}
public void setAcademy(String academy) {
this.academy = academy;
}
public String getClassroom() {
return classroom;
}
public void setClassroom(String classroom) {
this.classroom = classroom;
}
public String getOpentime() {
return opentime;
}
public void setOpentime(String opentime) {
this.opentime = opentime;
}
}

 

 

 

 

 

三、亲,最后一点别忘了在androidManifest.xml中声明跳转 的Activity哦-

 

 <activity android:name=".AcademyRoom" />

 

四、要解析的XMl如下:classroom.xml

 

<?xml version="1.0" encoding="utf-8"?>
<university>




<colledge>
<academy>学院:外国语学院(1号楼)</academy>
<classroom>常用自习室:1#110 1#227 1#229 1#230 </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>


<monday>周一自习室:全天 106 108 206    </monday>
<tuesday>周二自习室:全天  106 108 206 115   </tuesday>
<wednesday>周三自习室:全天  106 108  206</wednesday>
<tursday>周四自习室:全天  106 108 206 8点-12点:115   </tursday>
<friday>周五自习室:全天  106 108  206 3点-7点:115   </friday>
<sarturday>周六自习室:全天  106 108  110 115 206 227 229 230 </sarturday>
<sunday>周日自习室:全天  106 108  110 115 206 227 229 230</sunday>


</colledge>


<colledge>
<academy>学院:数理学院(1号楼) </academy>
<classroom>常用自习室:1#508 1#526 1#529 </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:8点-10点:508 510 3点-5点:506      </monday>
<tuesday>周二自习室:8点-10点:508 3点-5点:506 508  3点-5点:510  </tuesday>
<wednesday>周三自习室:10点-12点:506 510 3点-5点:510</wednesday>
<tursday>周四自习室:8点-10点:506 510 3点-5点:508 510    </tursday>
<friday>周五自习室:全天:508 10点-12点:506  3点-5点:506 510      </friday>
<sarturday>周六自习室:506 508 510 526 529 </sarturday>
<sunday>周日自习室:  506 508 510 526 529   </sunday>


</colledge>


<colledge>
<academy>学院:生物与化学工程学院(2号楼)</academy>
<classroom>常用自习室: 2#507 2#509 2#511 2#513 2#515 2#516 </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:10点-12点:510 512    </monday>
<tuesday>周二自习室:10点-12点:510 512 3点-7点:510 512 5点-7点:522  </tuesday>
<wednesday>周三自习室:8点-10点:510 512 3点-5点:512 5点-7点:522</wednesday>
<tursday>周四自习室:8点-10点:510 10点-12点:510 3点-5点:512 5点-7点:522   </tursday>
<friday>周五自习室:10点-12点:510   晚8点-晚10点 510 512 518 522   </friday>
<sarturday>周六自习室:510 512 518 519 521 523  </sarturday>
<sunday>周日自习室: 510 512 518  519 521 523(其中2#507 2#509为考研自习室)</sunday>


</colledge>


<colledge>
<academy>学院:电子与电气工程学院(4号楼) </academy>
<classroom>常用自习室:4#405 4#413 4#505 4#513 4#514 4#515  </classroom>
<opentime>开放时间: 早8点到晚10点</opentime>
<monday>周一自习室:8点-12点:203  405 413  </monday>
<tuesday>周二自习室:全天:413 8点-12点:203 3点-晚10点:203   </tuesday>
<wednesday>周三自习室:10点-5点:203 413 8点-12点:405 </wednesday>
<tursday>周四自习室:8点-12点:203 413 3点-7点:405    </tursday>
<friday>周五自习室:全天203 405 413    </friday>
<sarturday>周六自习室:203 405 413 505 513 514 515 </sarturday>
<sunday>周日自习室:203  405 413 505 513 514 515   </sunday>
</colledge>


<colledge>
<academy>学院:土木工程学院(5号楼)</academy>
<classroom>常用自习室:5#301 5#303 5#421 5#423 5#425 5#509</classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室: 8点-10点:508 3点-5点:508 5点-7点:303 10点-12点:318  </monday>
<tuesday>周二自习室:8点-10点:303 10点-12点:318 3点-5点:303 318 508  </tuesday>
<wednesday>周三自习室:3点-5点:303 5215点-7点:303 518  </wednesday>
<tursday>周四自习室:8点-10点:303 518 5点-7点:303   </tursday>
<friday>周五自习室:8点-10点:518 3点-5点:303 521    </friday>
<sarturday>周六自习室:301 303 421 423 425 509 516 519 521  </sarturday>
<sunday>周日自习室: 301 303 421 423 425 509 516 519 521</sunday>




</colledge>


<colledge>
<academy>学院:机械与汽车工程学院 (6号楼)</academy>
<classroom>常用自习室:6#301 6#317 6#315 6#303 6#313 6#310  </classroom>
<opentime>开放时间: 早8点到晚10点</opentime>
<monday>周一自习室:10点-12点:204      </monday>
<tuesday>周二自习室: 10点-12点:409 3点-7点:204 409   </tuesday>
<wednesday>周三自习室:5点-7点:409  </wednesday>
<tursday>周四自习室:8点-10点:409 3点-7点:204    </tursday>
<friday>周五自习室: 10点-12点:409     </friday>
<sarturday>周六自习室:204  301 303 307 310 315 317 411 414 416 406 418 420 </sarturday>
<sunday>周日自习室:204 301 303 307 310 315 317 411 414 416 406 418 420 </sunday>


</colledge>


<colledge>
<academy>学院:计算机与信息工程学院(7号楼)</academy>
<classroom>常用自习室:7#107 7#109 7#111 7#113 7#115 7#205  </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:8点-10点: 112   5点-7点:106  108 116 </monday>
<tuesday>周二自习室:8点-10点: 112 5点-7点:101  106 108 116  </tuesday>
<wednesday>周三自习室:10点-12点:106  108 112 116</wednesday>
<tursday>周四自习室:8点-10点:106 112  5点-7点:106  108  </tursday>
<friday>周五自习室:8点-10点:101 106 108 5点-7点:101   108  </friday>
<sarturday>周六自习室:107 109 111 113 115 205 211 213 </sarturday>
<sunday>周日自习室: 107 109 111 113 115 205 207 209 </sunday>


</colledge>


<colledge>
<academy>学院:艺术设计学院 (8号楼)</academy>
<classroom>常用自习室:暂无 </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:3点-7点:  419    </monday>
<tuesday>周二自习室: 3点-5点:109 411 419 508  </tuesday>
<wednesday>周三自习室: 3点-5点:109 411  416 508</wednesday>
<tursday>周四自习室:   3点-7点:  419  </tursday>
<friday>周五自习室:8点-10点:411  3点-7点:  419  508  </friday>
<sarturday>周六自习室:109 411 508 </sarturday>
<sunday>周日自习室:109 411 508     </sunday>




</colledge>


<colledge>
<academy>学院:国际教育学院(9号楼) </academy>
<classroom>常用自习室:9#602 9#607 9#608 9#609 9#610 9#611 </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:8点-10点:602  607 612 10点-12:608   </monday>
<tuesday>周二自习室:全天 608 3点-7点:602  607 612</tuesday>
<wednesday>周三自习室:8点-10点:602 5点-7点:607   </wednesday>
<tursday>周四自习室:全天 608 6123点-7点:602   607  </tursday>
<friday>周五自习室:全天 607 608 8点-10点:602  612    </friday>
<sarturday>周六自习室:602 607 608 609 610 611 </sarturday>
<sunday>周日自习室: 602 607 608 609 610 611 612 620</sunday>


</colledge>


<colledge>
<academy>学院:商学院(9号楼)</academy>
<classroom>常用自习室:9#501 9#503 9#505 9#515 9#520  </classroom>
<opentime>开放时间: 早8点到晚10点</opentime>
<monday>周一自习室:3点-5点:505 5点-7点:503  515     </monday>
<tuesday>周二自习室:  3点-5点:511 5点-7点:503 </tuesday>
<wednesday>周三自习室:8点-10点:503 5点-7点:503 </wednesday>
<tursday>周四自习室:8点-10点:503   5点-7点:503 </tursday>
<friday>周五自习室: 10点-12点:505  5点-7点:503 </friday>
<sarturday>周六自习室:501 503 505 515 520  </sarturday>
<sunday>周日自习室:   501 503 505 515 520  </sunday>
</colledge>


<colledge>
<academy>学院:文法学院(10号楼) </academy>
<classroom>常用自习室:10#320 10#418 10#402 10#407 10#409 </classroom>
<opentime>开放时间: 早8点到晚10点</opentime>
<monday>周一自习室:5点-7点:402 404</monday>
<tuesday>周二自习室:10点-晚10点:304 5点-7点:402 406  412 416</tuesday>
<wednesday>周三自习室: 5点-7点: 404 406 </wednesday>
<tursday>周四自习室:5点-7点: 404    </tursday>
<friday>周五自习室:5点-7点: 404 406   412 </friday>
<sarturday>周六自习室: 320 418 402 407 409 </sarturday>
<sunday>周日自习室:320 418 402 407 408 409     </sunday>


</colledge>


<colledge>
<academy>学院:张仲景国医学院(11号楼)  </academy>
<classroom>常用自习室:11#520 11#501 11#509 11#616 11#618 </classroom>
<opentime>开放时间: 早8点到晚10点</opentime>
<monday>周一自习室:8点-10点:514 519 602 5点-7点:514 602      </monday>
<tuesday>周二自习室:3点-5点:514 519 521    </tuesday>
<wednesday>周三自习室:8点-10点 :514   </wednesday>
<tursday>周四自习室:8点-10点:514 521  5点-7点:602  </tursday>
<friday>周五自习室: 5点-7点:514  519 521     </friday>
<sarturday>周六自习室:全天 514 521  601 602 616 618</sarturday>
<sunday>周日自习室:全天501 509 514 521 520  601 602  616 618  </sunday>


</colledge>




<colledge>
<academy>学院:建筑与城市规划学院(13号楼)  </academy>
<classroom>常用自习室:13#407  </classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室:302 304 305 402全天  3点-7点:101 115 302全天    </monday>
<tuesday>周二自习室:302全天  10点-12点: 101 3点-7点:115 304  405</tuesday>
<wednesday>周三自习室:302 304 305 全天  101全天 10点-12点:115  </wednesday>
<tursday>周四自习室:8点-12点:302 3点-7点:115 304   </tursday>
<friday>周五自习室:304 402  全天8点-12点:101 115 5点-7点:101 115   </friday>
<sarturday>周六自习室:全天 :101 115 302 304 305 402 </sarturday>
<sunday>周日自习室:全天: 101  115 302 304  305 402</sunday>
</colledge>


<colledge>
<academy>学院:软件学院(14号楼) </academy>
<classroom>常用自习室:14#102 14#104 14#106  15#408</classroom>
<opentime>开放时间: 早8点到晚10点 </opentime>
<monday>周一自习室: 10点-12点: 306       </monday>
<tuesday>周二自习室:8点-10点: 104 106 204 3点-7点: 102 206 302 304 306  </tuesday>
<wednesday>周三自习室:8点-10点: 104 206 302 304 306 10点-12点: 102 106 15:00-19:00 202 17:00-19:00 104 20:00-22:00 304</wednesday>
<tursday>周四自习室:10点-12点: 302 306 102 3点-5点: 104 5点-7点: 106  晚8点-晚10点: 306 </tursday>
<friday>周五自习室:8点-10点: 102 106 204 302 304 10点-12点: 106 3点-5点 104 106  晚8点-晚10点: 304 306</friday>
<sarturday>周六自习室: 全天 102 104 106</sarturday>
<sunday>周日自习室:全天 102 104 106</sunday>


</colledge>




</university>

 

 

 

 

运行结果如下:

 

 

至此,本篇已结束,如有不对的地方,欢迎您的建议与指正。同时期待您的关注,感谢您的阅读,谢谢!

如有侵权,请联系小编,小编对此深感抱歉,届时小编会删除文章,立即停止侵权行为,请您多多包涵。

既然都看到这里,领两个红包在走吧!
以下两个红包每天都可以领取

1.支付宝搜索 522398497,或扫码支付宝红包海报。

支付宝扫一扫,每天领取大红包

2.微信红包,微信扫一扫即可领取红包

 

微信扫一扫,每天领取微信红包

小礼物走一走,来简书关注我

posted @ 2012-05-20 13:04  程序员Android的博客  阅读(64)  评论(0编辑  收藏  举报