package com.huawei.bss.xml;
import java.io.Serializable;
import java.util.List;
public class InnerXMLBean implements Serializable
{
/**
* 注释内容
*/
private static final long serialVersionUID = 1L;
//列表的列号码
private String indexNumber;
//bom的值
private String bomValue;
//xml文件中的一个portToSolt对象
private List<PortToSoltBean> portToSolts;
/**
* @return 返回 bomValue
*/
public String getBomValue()
{
return this.bomValue;
}
/**
* @param 对bomValue进行赋值
*/
public void setBomValue(String bomValue)
{
this.bomValue = bomValue;
}
/**
* @return 返回 portToSolts
*/
public List<PortToSoltBean> getPortToSolts()
{
return this.portToSolts;
}
/**
* @param 对portToSolts进行赋值
*/
public void setPortToSolts(List<PortToSoltBean> portToSolts)
{
this.portToSolts = portToSolts;
}
/**
* @return 返回 indexNumber
*/
public String getIndexNumber()
{
return this.indexNumber;
}
/**
* @param 对indexNumber进行赋值
*/
public void setIndexNumber(String indexNumber)
{
this.indexNumber = indexNumber;
}
}
package com.huawei.bss.xml;
import java.io.Serializable;
public class PortToSoltBean implements Serializable
{
//内置接口端口号
private String port;
//内置接口槽位号
private String solt;
//内置接口板类型(前板/后板)
private String innerType;
/**
* @return 返回 port
*/
public String getPort()
{
return this.port;
}
/**
* @param 对port进行赋值
*/
public void setPort(String port)
{
this.port = port;
}
/**
* @return 返回 solt
*/
public String getSolt()
{
return this.solt;
}
/**
* @param 对solt进行赋值
*/
public void setSolt(String solt)
{
this.solt = solt;
}
/**
* @return 返回 innerType
*/
public String getInnerType()
{
return this.innerType;
}
/**
* @param 对innerType进行赋值
*/
public void setInnerType(String innerType)
{
this.innerType = innerType;
}
}
=============================================
<?xml version="1.0" encoding="UTF-8"?>
<connections>
<connection>
<bom>03051857,03053520</bom>
<portToSlots>
<portToSlot>
<port>G0/1</port>
<Slot>Slot 12</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/2</port>
<Slot>Slot 13</Slot>
<type>Base</type>
</portToSlot>
</portToSlots>
</connection>
<connection>
<bom>03051830</bom>
<portToSlots>
<portToSlot>
<port>G0/1</port>
<Slot>Slot 12</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/2</port>
<Slot>Slot 13</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/15</port>
<Slot>Fabric interconnection</Slot>
<type>Fabric</type>
</portToSlot>
</portToSlots>
</connection>
</connections>
import java.io.Serializable;
import java.util.List;
public class InnerXMLBean implements Serializable
{
/**
* 注释内容
*/
private static final long serialVersionUID = 1L;
//列表的列号码
private String indexNumber;
//bom的值
private String bomValue;
//xml文件中的一个portToSolt对象
private List<PortToSoltBean> portToSolts;
/**
* @return 返回 bomValue
*/
public String getBomValue()
{
return this.bomValue;
}
/**
* @param 对bomValue进行赋值
*/
public void setBomValue(String bomValue)
{
this.bomValue = bomValue;
}
/**
* @return 返回 portToSolts
*/
public List<PortToSoltBean> getPortToSolts()
{
return this.portToSolts;
}
/**
* @param 对portToSolts进行赋值
*/
public void setPortToSolts(List<PortToSoltBean> portToSolts)
{
this.portToSolts = portToSolts;
}
/**
* @return 返回 indexNumber
*/
public String getIndexNumber()
{
return this.indexNumber;
}
/**
* @param 对indexNumber进行赋值
*/
public void setIndexNumber(String indexNumber)
{
this.indexNumber = indexNumber;
}
}
package com.huawei.bss.xml;
import java.io.Serializable;
public class PortToSoltBean implements Serializable
{
//内置接口端口号
private String port;
//内置接口槽位号
private String solt;
//内置接口板类型(前板/后板)
private String innerType;
/**
* @return 返回 port
*/
public String getPort()
{
return this.port;
}
/**
* @param 对port进行赋值
*/
public void setPort(String port)
{
this.port = port;
}
/**
* @return 返回 solt
*/
public String getSolt()
{
return this.solt;
}
/**
* @param 对solt进行赋值
*/
public void setSolt(String solt)
{
this.solt = solt;
}
/**
* @return 返回 innerType
*/
public String getInnerType()
{
return this.innerType;
}
/**
* @param 对innerType进行赋值
*/
public void setInnerType(String innerType)
{
this.innerType = innerType;
}
}
=============================================
<?xml version="1.0" encoding="UTF-8"?>
<connections>
<connection>
<bom>03051857,03053520</bom>
<portToSlots>
<portToSlot>
<port>G0/1</port>
<Slot>Slot 12</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/2</port>
<Slot>Slot 13</Slot>
<type>Base</type>
</portToSlot>
</portToSlots>
</connection>
<connection>
<bom>03051830</bom>
<portToSlots>
<portToSlot>
<port>G0/1</port>
<Slot>Slot 12</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/2</port>
<Slot>Slot 13</Slot>
<type>Base</type>
</portToSlot>
<portToSlot>
<port>G0/15</port>
<Slot>Fabric interconnection</Slot>
<type>Fabric</type>
</portToSlot>
</portToSlots>
</connection>
</connections>