File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import { XmlNode } from './xmlNode' ;
2- import { XmlElement } from './xmlElement' ;
2+ import { XmlChildNode , XmlElement } from './xmlElement' ;
3+ import { XmlDoctype } from './xmlDoctype' ;
34
45/// The document node is simply a container for a sequence of XML nodes.
56export class XmlDocument extends XmlNode {
6- constructor ( public children : XmlNode [ ] ) {
7+ constructor ( public children : ( XmlChildNode | XmlDoctype ) [ ] ) {
78 super ( ) ;
89 }
910
Original file line number Diff line number Diff line change 33// -------------------------
44
55// Text node.
6- import { XmlNode } from './model/xmlNode' ;
76import { XmlText } from './model/xmlText' ;
87import { XmlComment } from './model/xmlComment' ;
98import { XmlProcessing } from './model/xmlProcessing' ;
@@ -25,7 +24,7 @@ export class XmlParser {
2524
2625 static parse ( xml : string ) : XmlDocument {
2726 const parser = new XmlParser ( xml ) ;
28- const children : XmlNode [ ] = [ ] ;
27+ const children : ( XmlChildNode | XmlDoctype ) [ ] = [ ] ;
2928 while ( parser . pos < parser . input . length ) {
3029 const node = parser . parseNode ( ) ;
3130 if ( node ) {
You can’t perform that action at this time.
0 commit comments