1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wsdl.panels.request.components.editor.support;
14
15 import org.apache.xmlbeans.SchemaTypeSystem;
16 import org.apache.xmlbeans.XmlException;
17 import org.apache.xmlbeans.XmlObject;
18
19
20 public class XmlObjectXmlDocument extends AbstractXmlDocument
21 {
22 private XmlObject xmlObject;
23
24 public XmlObjectXmlDocument( XmlObject xmlObject )
25 {
26 this.xmlObject = xmlObject;}
27
28 public SchemaTypeSystem getTypeSystem()
29 {
30 return xmlObject == null ? null : xmlObject.schemaType().getTypeSystem();
31 }
32
33 public String getXml()
34 {
35 return xmlObject.toString();
36 }
37
38 public void setXml(String xml)
39 {
40 try
41 {
42 String old = getXml();
43 xmlObject = XmlObject.Factory.parse( xml );
44 fireXmlChanged( old, getXml() );
45 }
46 catch (XmlException e)
47 {
48 e.printStackTrace();
49 }
50 }
51
52 }