Professional Web Applications Themes

[HTML::Element] how to read element by element - PERL Modules

Hello I read the doc about HTML::Element, but I don't find how to read the tree create by p() element by element. The doc says the tree looks like: element #1: _tag: 'html' _parent: none _content: [element #2, element #5] lang: 'en-US' element #2: _tag: 'head' _parent: element #1 _content: [element #3, element #4] element #3: _tag: 'title' _parent: element #2 _content: [text segment "Stuff"] element #4 _tag: 'meta' _parent: element #2 _content: none name: author content: Jojo element #5 _tag: 'body' _parent: element #1 _content: [element #6] element #6 _tag: 'h1' _parent: element #5 _content: [text segment "I like ...

  1. #1

    Default [HTML::Element] how to read element by element

    Hello
    I read the doc about HTML::Element, but I don't find how to read the
    tree create by p() element by element. The doc says the tree looks like:
    element #1: _tag: 'html'
    _parent: none
    _content: [element #2, element #5]
    lang: 'en-US'

    element #2: _tag: 'head'
    _parent: element #1
    _content: [element #3, element #4]

    element #3: _tag: 'title'
    _parent: element #2
    _content: [text segment "Stuff"]

    element #4 _tag: 'meta'
    _parent: element #2
    _content: none
    name: author
    content: Jojo

    element #5 _tag: 'body'
    _parent: element #1
    _content: [element #6]

    element #6 _tag: 'h1'
    _parent: element #5
    _content: [text segment "I like potatoes"]

    But, How can I access to element #2, element #5._content, ...?

    Thank you
    Julien

    julien Guest

  2. #2

    Default Re: [HTML::Element] how to read element by element


    "julien" <juliensobrier.net> wrote in message
    news:3f5926cc$0$28880$626a54cenews.free.fr...
    > Hello
    > I read the doc about HTML::Element, but I don't find how to read the
    > tree create by p() element by element.
    It sounds like you are talking about the traverse method. Also, you usually
    don't want to read a tree element by element.

    See look_down(). It is probably more useful. Also see objectify_text().



    Terrence Brannon Guest

Similar Threads

  1. Handling HTML element events using AxWebBrowser
    By Bill in forum ASP Components
    Replies: 2
    Last Post: March 6th, 02:52 PM
  2. how to check array element's values if this element isempty
    By jiecoldfusion in forum Macromedia ColdFusion
    Replies: 2
    Last Post: February 25th, 10:00 PM
  3. How to *modify* text in HTML::Element
    By El Duce in forum PERL Modules
    Replies: 3
    Last Post: October 24th, 01:32 AM
  4. How to text in HTML::Element
    By El Duce in forum PERL Modules
    Replies: 0
    Last Post: October 23rd, 11:31 PM
  5. Value of an HTML element
    By Halo in forum ASP.NET General
    Replies: 3
    Last Post: July 8th, 03:16 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139