开发者

xml xpath read big file, from one part to other

I have very long xml file, like this:

<cars>
    <car>
        <name>Ford</name>
        <number>F33</number>
        <color>Blue</color>
    </car>
    <car>
        <name>Ford</name>
        <number>F43</number>
        <color>Red</color>
    </car>
    <car>
        <name>Ford</name>
        <number>F53</number>
        <color>Red</color>
    </car>  
    <car>
        <name>Audi</name>
        <number>A001</number>
        <color>Red</color>
    </car>
    <car>
        <name>Audi</name>
        <number>A032</number>
        <color>White&开发者_如何学JAVAlt;/color>
    </car>
       .......
</cars>

How with php xpath read from one part to ather.

For example like sql LIMIT 10, 30 show elemens from 10 to 30


How with php xpath read from one part to ather.

For example like sql LIMIT 10, 30 show elemens from 10 to 30

Use:

/*/car[position() > 9 and not(position() > 30)]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜