4 * This file was generated by XMLSpy 2007sp2 Enterprise Edition.
6 * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
7 * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
9 * Refer to the XMLSpy Documentation for further details.
10 * http://www.altova.com/xmlspy
14 package com.jmex.xml.xml;
16 import com.jmex.xml.types.SchemaString;
17 import com.jmex.xml.types.SchemaType;
19 public class AnyTypeNode extends Node {
21 public AnyTypeNode(AnyTypeNode node) {
25 public AnyTypeNode(org.w3c.dom.Node node) {
29 public AnyTypeNode(org.w3c.dom.Document doc) {
33 public AnyTypeNode(Document doc, String namespaceURI, String prefix, String name) {
34 super(doc, namespaceURI, prefix, name);
37 public SchemaString getValue() {
38 return new SchemaString(getDomNodeValue(dereference(domNode)));
39 // TODO this should be: return new SchemaString(getDomNodeValue(domNode));
42 public void setValue(SchemaType value) {
43 setDomNodeValue(domNode, value.toString());
46 public void assign(SchemaType value) {
50 public org.w3c.dom.Node getFirstChildElement(String namespaceURI, String name ) {
51 return getDomFirstChild(com.jmex.xml.xml.Node.Element, namespaceURI, name );
54 public org.w3c.dom.Node getNextChildElement(String namespaceURI, String name, org.w3c.dom.Node childNode ) {
55 return getDomNextChild(com.jmex.xml.xml.Node.Element, namespaceURI, name, childNode);
58 public void appendChildElement(String namespaceURI, String name, com.jmex.xml.xml.Node node) throws Exception {
59 if (node.getDomNode().getNodeType() != org.w3c.dom.Node.ELEMENT_NODE)
60 throw new XmlException("appendChildElement: Node is not an element");
62 //domNode.appendChild(cloneDomElementAs(namespaceURI, name, node));or
63 domNode.appendChild(node.getDomNode());
66 public org.w3c.dom.Node createNewChildElement(String namespaceURI, String name) {
67 org.w3c.dom.Element newDomNode = domNode.getOwnerDocument().createElementNS(namespaceURI, name);
68 domNode.appendChild(newDomNode);
72 public org.w3c.dom.Node appendChildElement(String namespaceURI, String name, String value) {
73 return appendDomChild(com.jmex.xml.xml.Node.Element, namespaceURI, name, value);
77 public org.w3c.dom.Node appendChildElement(String namespaceURI, String name, String type, String value) {
78 org.w3c.dom.Element domElement = (org.w3c.dom.Element)appendDomChild(com.jmex.xml.xml.Node.Element, namespaceURI, name, value);
79 domElement.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:type", type);
82 public void adjustPrefix() {
85 public void addTextNode(String value) throws Exception {
86 appendDomChild(Text, null, null, value.toString());
89 public void addComment(String value) throws Exception {
90 appendDomChild(Comment, null, null, value.toString());
93 public void addCDataNode(String value) throws Exception {
94 appendDomChild(CData, null, null, value.toString());
97 public void addProcessingInstruction(String name, String value) throws Exception {
98 appendDomChild(ProcessingInstruction, null, name.toString(), value.toString());