Given the following xml , I would like to XPATH for the Placement or
Settlement  menuitem and then construct another XML file shown below
from the childnodes of the subMenu node.

<menu>
<menuItem>
  <text>Placement</text>
  <cssclass>highlighteditem</cssclass>
  <subMenu>
        <menuItem>
        <text>Sub Item 3</text>
        <url>page3.html</url>
        </menuItem>
        <menuItem>
        <text>Sub Item 4</text>
        <url>page4.html</url>
        </menuItem>
  </subMenu>
</menuItem>

<menuItem>
<text>Settlement</text>
<cssclass>highlighteditem</cssclass>
        <subMenu>
                <menuItem>
                <text>Sub Item 3</text>
                <url>page3.html</url>
                </menuItem>
                <menuItem>
                <text>Sub Item 4</text>
                <url>page4.html</url>
                </menuItem>
        </subMenu>
</menuItem>
</menu>


This is the desired submenu xml that I would like to create:

<menu>
        <menuItem>
        <text>Sub Item 3</text>
        <url>page3.html</url>
        </menuItem>
        <menuItem>
        <text>Sub Item 4</text>
        <url>page4.html</url>
        </menuItem>
</menu>

Thanks, Paul

On 7/18/05, getsmartpaul86 <[EMAIL PROTECTED]> wrote:
> Hi Xmlers,
> 
> I'm looking for an example that would
> use xpath to search a document for a Node and then
> clone / copy that node and it's children to another xmldocument.
> 
> I'm working with skmMenu by Scott Mitchell and have a Horizontal Top
> Menu and would like to search the menu xml nodes to find
> the current Top Level Menu and copy it's children
> and then show those nodes also in a left hand - navigation menu.
> 
> Thus if the  top menu has   CatA , CatB, CatC
> then the xpath to CatB
> would find all the childnodes of CatB and then copy them
> to a new XML document.
> 
> Thanks for your help, Paul
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to