1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Nov 2017
4 */
5 /*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements. See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xerces.internal.parsers;
23
68 import org.w3c.dom.NamedNodeMap;
69 import org.w3c.dom.Node;
70 import org.w3c.dom.NodeList;
71 import org.w3c.dom.ProcessingInstruction;
72 import org.w3c.dom.Text;
73 import org.w3c.dom.ls.LSParserFilter;
74 import org.w3c.dom.traversal.NodeFilter;
75 import org.xml.sax.SAXException;
76
77 /**
78 * This is the base class of all DOM parsers. It implements the XNI
79 * callback methods to create the DOM tree. After a successful parse of
80 * an XML document, the DOM Document object can be queried using the
81 * <code>getDocument</code> method. The actual pipeline is defined in
82 * parser configuration.
83 *
84 * @author Arnaud Le Hors, IBM
85 * @author Andy Clark, IBM
86 * @author Elena Litani, IBM
87 *
88 */
89 public class AbstractDOMParser extends AbstractXMLDocumentParser {
90
91 //
92 // Constants
93 //
94
95 // feature ids
96
97 /** Feature id: namespace. */
98 protected static final String NAMESPACES =
99 Constants.SAX_FEATURE_PREFIX+Constants.NAMESPACES_FEATURE;
100
101 /** Feature id: create entity ref nodes. */
102 protected static final String CREATE_ENTITY_REF_NODES =
103 Constants.XERCES_FEATURE_PREFIX + Constants.CREATE_ENTITY_REF_NODES_FEATURE;
104
105 /** Feature id: include comments. */
106 protected static final String INCLUDE_COMMENTS_FEATURE =
107 Constants.XERCES_FEATURE_PREFIX + Constants.INCLUDE_COMMENTS_FEATURE;
|
1 /*
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xerces.internal.parsers;
22
67 import org.w3c.dom.NamedNodeMap;
68 import org.w3c.dom.Node;
69 import org.w3c.dom.NodeList;
70 import org.w3c.dom.ProcessingInstruction;
71 import org.w3c.dom.Text;
72 import org.w3c.dom.ls.LSParserFilter;
73 import org.w3c.dom.traversal.NodeFilter;
74 import org.xml.sax.SAXException;
75
76 /**
77 * This is the base class of all DOM parsers. It implements the XNI
78 * callback methods to create the DOM tree. After a successful parse of
79 * an XML document, the DOM Document object can be queried using the
80 * <code>getDocument</code> method. The actual pipeline is defined in
81 * parser configuration.
82 *
83 * @author Arnaud Le Hors, IBM
84 * @author Andy Clark, IBM
85 * @author Elena Litani, IBM
86 *
87 * @LastModified: Nov 2017
88 */
89 public class AbstractDOMParser extends AbstractXMLDocumentParser {
90
91 //
92 // Constants
93 //
94
95 // feature ids
96
97 /** Feature id: namespace. */
98 protected static final String NAMESPACES =
99 Constants.SAX_FEATURE_PREFIX+Constants.NAMESPACES_FEATURE;
100
101 /** Feature id: create entity ref nodes. */
102 protected static final String CREATE_ENTITY_REF_NODES =
103 Constants.XERCES_FEATURE_PREFIX + Constants.CREATE_ENTITY_REF_NODES_FEATURE;
104
105 /** Feature id: include comments. */
106 protected static final String INCLUDE_COMMENTS_FEATURE =
107 Constants.XERCES_FEATURE_PREFIX + Constants.INCLUDE_COMMENTS_FEATURE;
|