• Table 5.2: nodeValue Behavior for Different Node Types Node type nodename property
  • Microsoft Word Applied xml a toolkit for Programmers Wiley doc




    Download 2,96 Mb.
    Pdf ko'rish
    bet108/131
    Sana14.05.2024
    Hajmi2,96 Mb.
    #232039
    1   ...   104   105   106   107   108   109   110   111   ...   131
    Bog'liq
    Ceponkus, Hoodbhoy - Applied XML - Toolkit for Programmers

     
    nodeValue
    Type
    : String
    Description
    : This string property represents the data that is contained within a node. 
    Depending on the type of node that this property is used on, the results will vary. Table 
    5.2 describes behavior for nodeValue.
    Comments
    : Notice that Element is not included in the list in Table 5.2. Element has been 
    omitted because an Element node contains a Text node to hold the data. It might seem 
    annoying to have to dig one level deeper in the tree to get at the elements contents, but 
    this behavior occurs because multiple Text nodes can exist under an Element. To make 
    matters more complicated, an EntityReference node might exist between two Text nodes, 
    and all three nodes will be children of an Element node. This behavior exists for all nodes 
    that can have Text nodes as children, please refer to Figures 4.13 through 4.19 (The Big 
    Picture) to see which nodes have Text nodes as children. Also, if the nodeValue property 
    is written to, then all the previous nodes under the Attribute node are deleted and one 
    text node is created with the new contents.
    Table 5.2: nodeValue Behavior for Different Node Types
     
    Node type
    nodename property
     
    Attribute
    attribute value
    ProcessingInstruction
    text (typical processing instruction: )
    Comment
    comment text
    Text
    text
    CDATASection
    text
    Other node types
    null


    - 119 -
     
    Example
    :




    Download 2,96 Mb.
    1   ...   104   105   106   107   108   109   110   111   ...   131




    Download 2,96 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Microsoft Word Applied xml a toolkit for Programmers Wiley doc

    Download 2,96 Mb.
    Pdf ko'rish