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