FB55/node-htmlparser — Issue #16: xmlMode Incompleteness/Inconsistencies
Author: siddMahen
Created: 2012-02-20 11:40:09+00:00
State: open

Certain tags, such as `link` and `meta` are treated like HTML tags when the parser is set to `xmlMode` and they shouldn't be. For example:

```
var htmlparser2 = require("./lib/index"),
DomUtils = htmlparser2.DomUtils;

var handler = new htmlparser2.DomHandler({xmlMode: true}),
parser = new htmlparser2.Parser(handler);

parser.parseComplete('foo');

console.log(handler.dom);
console.log(DomUtils.getOuterHTML(handler.dom[0]));
console.log(DomUtils.getInnerHTML(handler.dom[0]));
```

returns:

```
[ { type: 'tag', name: 'link' }, { data: 'foo', type: 'text' } ]

```

rather than what I expected:

```
[ { type: 'tag', name: 'link' , children: [ { data: 'foo', type: 'text' } ] ]
foo
foo
```