opened
daveaglick
username_0
## New Feature Proposal

### Description

XML processing instructions are currently commented out during parsing and added to the DOM as comment nodes. The following:

```
<?php foo >
```

Becomes:

```
<!--?php foo -->
```

This proposal is to add optional support for creating `ProcessingInstruction` nodes in the DOM instead of commenting out processing instructions.

### Background

XML processing instructions are a bit of a gray area. They're not technically valid HTML, but being able to parse them and add `ProcessingInstruction` nodes (which already exist) to the DOM would be useful in certain scenarios. As prior art, many web-processing engines already have special support for processing instructions. For example, [CommonMark](https://spec.commonmark.org/0.28/#processing-instruction) has processing instruction support written into the specification.

See https://github.com/Wyamio/Wyam/issues/784

### Specification

This behavior is outside the HTML specification so it will be enabled via a switch in `HtmlParserOptions`.

Note that based on previous conversations I intend to implement this as a PR unless instructed otherwise.
Add support for parsing XML processing instructions
issue
created
FlorianRappl
username_1
Sounds good! As discussed any contribution on this one would be appreciated. If you need help / want some (design) discussion or where to place / find things - just message either here, on Twitter, or via the Gitter channel (I re-activated it; I'll be there).
comment
created
FlorianRappl
username_1
Landed in devel - scheduled for next release.
comment
closed
FlorianRappl
username_1
issue