How do I create an empty attribute NSXLNode?

  • I'm trying to parse some (x)HTML code using NSXMLDocument and am
    trying to add an empty attribute such as 'checked' as in:

    <input type=checkbox checked>My checkbox</input>

    However, I can't seem to find a way to create an attribute without an
    associated value. Am I missing something obvious here?

    How do I create an NSXMLNode for the 'checked' attribute?

    Many thanks in advance.

    --
    Mark Munz
    unmarked software
    http://www.unmarked.com/
  • --- Mark Munz <unmarked...> wrote:

    > I'm trying to parse some (x)HTML code using
    > NSXMLDocument and am
    > trying to add an empty attribute such as 'checked'
    > as in:
    >
    > <input type=checkbox checked>My checkbox</input>

    Attributes like that aren't well-formed XML. They are
    fine for HTML, but in XML (and thus in XHTML), it
    should be <input type="checkbox" checked="checked">My
    checkbox</input>.

    Cheers,
    Chuck


    ____________________________________________________________________________________
    Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
    http://answers.yahoo.com/dir/?link=list&sid=396545469
previous month october 2007 next month
MTWTFSS
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        
Go to today