1 /*
2 * Copyright 2007 Edward Kuns
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * $Id: ProcessingInstruction.java 0000 2007-01-11 00:00:00Z ekuns $
17 */
18 package org.castor.xmlctf.xmldiff.xml.nodes;
19
20
21 /**
22 * A class representing an XML Processing Instruction.
23 *
24 * @author <a href="mailto:edward.kuns@aspect.com">Edward Kuns</a>
25 * @version $Revision: 0000 $ $Date: 2007-01-11 00:00:00 -0600 (Thu, 11 Jan 2007) $
26 * @since Castor 1.1
27 */
28 public class ProcessingInstruction extends XMLNode {
29
30 /** Serial Version UID. */
31 private static final long serialVersionUID = 4502831396237763129L;
32 /** Value of the processing instructions. */
33 private final String _value;
34
35 /**
36 * Creates a new ProcessingInstruction.
37 *
38 * @param target the target for this Processing Instruction. (May be null.)
39 * @param value the value of this Processing Instruction. (May be null.)
40 */
41 public ProcessingInstruction(final String target, final String value) {
42 super(null, target, XMLNode.PROCESSING_INSTRUCTION);
43 _value = value;
44 }
45
46 /**
47 * Returns the string value of the node. The string value of a processing
48 * instruction is the instruction.
49 *
50 * @return The string value of the node.
51 */
52 public String getStringValue() {
53 return _value;
54 }
55
56 }