I have used DOM Documents with xml like <a>dasdasd</a> etc.. but does it work with a tag like <br />? A single tag with no content? Could I access that <br /> tag like I would any other tag?
Printable View
I have used DOM Documents with xml like <a>dasdasd</a> etc.. but does it work with a tag like <br />? A single tag with no content? Could I access that <br /> tag like I would any other tag?
Yes, it works.
Don't think of them as tags.
This:
is two nodes: an element, and a text node.Code:<a>dasdasd</a>
This:
is one node.Code:<br />