Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Jsp & xml

  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Jsp & xml

    I am using following script to get data from XML file in JSP
    Code:
            <%        
            Element element1 = doc.getDocumentElement();
            NodeList nodelistA = element1.getChildNodes();
            Node nodeA = nodelistA.item(1); 
            NodeList nodelistB = nodeA.getChildNodes();
            Node nodeB = nodelistB.item(5); %>
            <%= nodeB.getFirstChild().getNodeValue() %> <br>
    I want to append new node/element in XML file, I need help to do so, if some one knows then please reply me soon.

    Thanks & Regards
    Shahzad

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •