copy-of vs value-of

Discussion in 'XML' started by Baldo, Dec 11, 2003.

  1. Baldo

    Baldo Guest

    i've got:

    <root>
    <text>123<br/>ASD
    </text>
    </root>

    copy-of select="root/text" :

    <text>123<br/>ASD</text>
    ----------------------------
    value-of select="root/text" :

    123 ASD
    -----------------------------

    but I wanna

    123 <br/> ASD

    as result.

    The source is blocked (I cannot change it creating CDATA o something else)
    Baldo, Dec 11, 2003
    #1
    1. Advertising

  2. Baldo wrote:
    > i've got:
    >
    > <root>
    > <text>123<br/>ASD
    > </text>
    > </root>
    >
    > copy-of select="root/text" :
    >
    > <text>123<br/>ASD</text>
    > ----------------------------
    > value-of select="root/text" :
    >
    > 123 ASD
    > -----------------------------
    >
    > but I wanna
    >
    > 123 <br/> ASD
    >
    > as result.
    >
    > The source is blocked (I cannot change it creating CDATA o something else)


    try this :
    copy-of select="root/text/node()"

    --
    Cordialement,

    ///
    (. .)
    -----ooO--(_)--Ooo-----
    | Philippe Poulard |
    -----------------------
    Philippe Poulard, Dec 11, 2003
    #2
    1. Advertising

  3. Baldo

    Baldo Guest

    > try this :
    > copy-of select="root/text/node()"


    nice trick :)

    tnx!
    Baldo, Dec 16, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Blair
    Replies:
    4
    Views:
    1,075
    John Saunders
    Jan 12, 2005
  2. Steve Richter
    Replies:
    4
    Views:
    5,435
    Steve Richter
    Apr 18, 2005
  3. Alex
    Replies:
    2
    Views:
    1,199
  4. Replies:
    26
    Views:
    2,083
    Roland Pibinger
    Sep 1, 2006
  5. VUNETdotUS
    Replies:
    25
    Views:
    431
    Thomas 'PointedEars' Lahn
    Nov 10, 2007
Loading...

Share This Page