我正在尝试获取所有<Opening>
标签的<PlanarGeometry>
数量<Polyloop>
> CartesianPoint
4。
Xml 标记表面是另一个标记表面。
<Surface id="su-137" surfaceType="InteriorWall" constructionIdRef="ASHIW23" xmlns="http://www.gbxml.org/schema">
<Name>W-106-114-I-W-137</Name>
<Opening id="su-137-op-1" openingType="NonSlidingDoor" constructionIdRef="MDOOR">
<Name>W-106-114-I-W-137-D-1</Name>
<PlanarGeometry>
<PolyLoop>
<CartesianPoint><Coordinate>55.570238</Coordinate><Coordinate>92.571596</Coordinate>
<Coordinate>0.000000</Coordinate></CartesianPoint><CartesianPoint> <Coordinate>55.570238</Coordinate><Coordinate>92.571596</Coordinate><Coordinate>6.666667</Coordinate>
</CartesianPoint>
<CartesianPoint>
<Coordinate>55.570238</Coordinate><Coordinate>95.571596</Coordinate><Coordinate>6.666667</Coordinate></CartesianPoint>
<CartesianPoint>
<Coordinate>55.570238</Coordinate><Coordinate>95.571596</Coordinate><Coordinate>0.000000</Coordinate>
</CartesianPoint>
</PolyLoop>
</PlanarGeometry>
</Opening>
</Surface>
我从中得到的参考很少 - Xpath 只选择存在子元素的节点?SO线程并从下面的示例中得到了一点帮助。
book[author/degree]
All <book> elements that contain <author> children that in turn contain at least one <degree> child.
我怎样才能使用 xPath 或其他方式实现这一点???