[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Adding elements to unknown tree structure

Subject: Adding elements to unknown tree structure
From: Gustave Stresen-Reuter <tedmasterweb@xxxxxxx>
Date: Wed, 21 Sep 2005 16:41:53 +0100
unknown tree
Given:

<myxmlfile>
    <folder name="root">
        <folder name="documents">
            <document name="passwords">
                123456
            </document>
        </folder>
        <folder name="pictures">
            <folder name="family" />
        </folder>
    </folder>
</myxmlfile>

parameter: folder_name = "friends"
parameter: path2folder = root/pictures

How can I create a new folder element named "friends" in the pictures element?

Keep in mind that I need to make sure that both "root" and "pictures" exist and if they don't, create them first.

Also, I use a "tokenizer" to split the path in the path2folder parameter to access the individual values, but it sure would be great if I could use something like an eval() function to go right to the folder...

I'm sure I can figure this out myself, but thought I'd check with the list before losing too much time reinventing the wheel.

Thanks in advance.

Ted Stresen-Reuter

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.