Create node identified by Xpath

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunsh
    New Member
    • Feb 2007
    • 4

    Create node identified by Xpath

    Hi
    I want to know if there is a method where given an xpath expression, i need to append a text to that node.
    For eg:
    <Books>
    <Book>
    <Name/>
    </Book>
    </Books>
    If i give ("/Books/Book/Name", "XML Bible") - first argument xpath, second argument the text to be put in that node.

    Is there any method which will do the way i want it as above.

    Thanks
    Arun
  • dorinbogdan
    Recognized Expert Contributor
    • Feb 2007
    • 839

    #2
    What programming language do you want to use for that?
    If dirrectly in XSL, I.m not sure if XSL syntax allows user-defined function calls.
    But, I think that you could use the existing XSL functions to get the same result.

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      XSL 2.0 allows user-defined functions, see this article

      Comment

      • arunsh
        New Member
        • Feb 2007
        • 4

        #4
        Originally posted by dorinbogdan
        What programming language do you want to use for that?
        If dirrectly in XSL, I.m not sure if XSL syntax allows user-defined function calls.
        But, I think that you could use the existing XSL functions to get the same result.
        Programming language i want it in Java.

        Comment

        • dorinbogdan
          Recognized Expert Contributor
          • Feb 2007
          • 839

          #5
          Hi,
          Did you succeed to solve the problem ?
          If yes, please let me know, in order to close the thread.
          Thanks,
          Dorin.

          Comment

          Working...