c++ - TinyXPath not filtering the required dom element according to the given attribute query? -
example xml is:
<dgn> <sg> <nodes> <node name="sphere 1" clsid="{cf21f965-203a-456a-83fe-a5f62d6d8e50}" type="mesh" id="{418acdd5-65d2-410f-b43b-0b48e4010b75}" subtype="" version="2.0" cloneparentkey="" nextcloneparentkey=""> <object id="{ac685ad2-3411-43b0-a29b-3b22086baef6}">sphere 1</object> <material id="{d2029f35-4a85-4669-bbf3-e754568ed88c}">standard 1</material> <controllers> <controller id="{989803fd-b575-45e4-b8a0-b5e69008145b}" weight="100" name="default" inherit="-1"> <tracks> <track name="radius" type="parametric" numkey="0" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float"> <key frame="-1">75.000000,0.000000,0.000000,0.000000</key> </interpolator> </track> </track> <track name="scale" type="srtv" numkey="101" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float3"> <key frame="-1">1.000000,1.000000,1.000000,1.000000</key> </interpolator> </track> <track name="rotation" type="srtv" numkey="102" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float3"> <key frame="-1">0.000000,0.000000,0.000000,0.000000</key> </interpolator> </track> </tracks> </controller> </controllers> <customdata> <offsetmatrix>1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1</offsetmatrix> <poslinkvector>0.000000,0.000000,0.000000,0.000000</poslinkvector> </customdata> </node> <node name="circle 1" clsid="{cf21f965-203a-456a-83fe-a5f62d6d8e50}" type="shape" id="{418acdd5-65d2-410f-b43b-0b48e4010b75}" subtype="" version="2.0" cloneparentkey="" nextcloneparentkey=""> <object id="{ac685ad2-3411-43b0-a29b-3b22086baef6}">sphere 1</object> <material id="{d2029f35-4a85-4669-bbf3-e754568ed88c}">standard 1</material> <controllers> <controller id="{989803fd-b575-45e4-b8a0-b5e69008145b}" weight="100" name="default" inherit="-1"> <tracks> <track name="radius" type="parametric" numkey="0" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float"> <key frame="-1">75.000000,0.000000,0.000000,0.000000</key> </interpolator> </track> </track> <track name="scale" type="srtv" numkey="101" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float3"> <key frame="-1">1.000000,1.000000,1.000000,1.000000</key> </interpolator> </track> <track name="rotation" type="srtv" numkey="102" pathfollow="0"> <interpolator clsid="{ecc9c2c7-5175-4784-9108-1fa4c25d3383}" type="float3"> <key frame="-1">0.000000,0.000000,0.000000,0.000000</key> </interpolator> </track> </tracks> </controller> </controllers> <customdata> <offsetmatrix>1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1</offsetmatrix> <poslinkvector>0.000000,0.000000,0.000000,0.000000</poslinkvector> </customdata> </node> </nodes> </sg> </dgn>
when query contains xpath "dgn/sg/nodes/node[@type='mesh']" should give me onle 1 node selects both nodes(sphere 1 , circle 1). not happens if change dom element name "node" else in xml i.e. if rename "node" "abc" , query xpath "dgn/sg/nodes/abc[@type='mesh']" filters desired dom element i.e. gives sphere 1. not happen dom element name other "node". node keyword in tinyxpath or else???
why happens dom element named "node"????
Comments
Post a Comment