现在有个文件算是xml格式的,但是不用xml 去解析。
我需要拿到 featurename 下一级标签的头 应该怎么得到,并且这个文件中可能有多个 featurename 下级标签都需要得到 用c 语言去写的话应该怎么写?
htmlID=1001&MessageID=196&<rpc message-id="196" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get><filter type="subtree">
<featurename istop="true" type="mib">
<entPhysicalEntry position="iso.org.dod.internet.mgmt.mib-2.entityMIB.entityMIBObjects.entityPhysical.entPhysicalTable"><entPhysicalSerialNum/><entPhysicalDescr/></entPhysicalEntry>
</featurename>
</filter>
</get>
</rpc>]]>]]>
htmlID=1001&MessageID=196&<rpc message-id="196" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get><filter type="subtree">
<featurename istop="true" type="mib">
<EntityStateEntry position="iso.org.dod.internet.private.enterprises.Mgmt.Datacomm.EntityExtentMIB.EntityExtObjects.EntityState.EntityStateTable">
<EntityCpuUsage/>
<EntityMemUsage/>
<EntityTemperature/>
<EntityCpuUsageThreshold/>
<EntityMemUsageThreshold/>
<EntityTemperatureThreshold/>
</EntityStateEntry>
</featurename>
</filter>
</get>
</rpc>]]>]]>
http://blog.csdn.net/xiaosong521/article/details/7410451
如果不使用XML类的话,那就按照XML字符串来解析。。根据标签,查找最近出现的即可。。。
查找 出现的位置和中间的内容。。。