Method used by tests to print out the read in configuration.

@return string representation of configuration
@throws XPathExpressionException
336478
String getConfigString() throws XPathExpressionException {
		ganglia = getXmlNode("/jmxetric-config/ganglia", inputSource);
		String hostname = getHostName();
		int port = getPort();
		UDPAddressingMode addressingMode = getAddressingMode();
		boolean v31x = getV31();
		String spoof = getSpoof();

		StringBuilder buf = new StringBuilder();
		buf.append("GMetric host=").append(hostname);
		buf.append(" port=").append(port);
		buf.append(" mode=").append(addressingMode);
		buf.append(" v31x=").append(v31x);
		buf.append(" spoof=").append(spoof);
		return buf.toString();
	}
54749
public String getXml() {
        try {
            return ((ByteArrayOutputStream) outputStream).toString(StandardCharsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            return outputStream.toString();
        }
    }
407315
public XMLString xstr(XPathContext xctxt)
          throws javax.xml.transform.TransformerException
  {
    return execute(xctxt).xstr();
  }
557412
public function getXml(): string
    {
        $suites = $this->interpreter->flattenCases();
        $root = $this->getSuiteRoot($suites);
        foreach ($suites as $suite) {
            $snode = $this->appendSuite($root, $suite);
            foreach ($suite->cases as $case) {
                $cnode = $this->appendCase($snode, $case);
            }
        }

        return $this->document->saveXML();
    }
18679
@Override
	public Document readXML() {
		final String xmlString = readString();
		Document doc = null;
		try {
			doc = XMLUtils.stringToDoc(xmlString);
		} catch (IOException ioex) {
			log.error("IOException converting xml to dom", ioex);
		}
		storeReference(doc);
		return doc;
	}
911046
public static synchronized void printConfiguration(String testName) {
        LocalConfig currentConfig = getConfig(testName);
        currentConfig.printConfigValues(testName);
    }
1264531
public function getXml()
    {
		$res  = '<widgetcontainer widgetAlias="'.htmlspecialchars($this->widgetAlias).'" widgetTitle="'.htmlspecialchars($this->widgetTitle).'" widgetDisabled="'.(int)$this->widgetDisabled.'" widgetProtected="'.(int)$this->widgetProtected.'">'."\n\n";
		foreach ($this->getChildren() as $w) {
			$res .= $w->getXml()."\n";
		}
		$res .= '</widgetcontainer>'."\n";
		return $res;
	}
517307
private function getExpression()
    {
        if ($this->expression === null) {
            $this->expression =
                '/(<\?xml.*\?>)?([ \t\n\r]*)(<' .
                preg_quote($this->documentElement, '/') .
                '.*xmlns="' .
                preg_quote($this->namespace, '/') .
                '".*>)/is';
        }

        return $this->expression;
    }
733080
public String displayConfiguration() {
		StringBuffer result = new StringBuffer();

		for (ConfigurationManager confManager : ConfigurationService
				.getConfigurationService().getConfigurationManager().values()) {
			Object configuration = confManager.getConfiguration();
			StringWriter writer = new StringWriter();
			JAXB.marshal(configuration, writer);
			result.append(writer.getBuffer());
			result.append("\n");
		}
		;

		return result.toString();
	}
315011
private String readContent(java.io.InputStream in) throws Exception {

        StringBuffer resultBuffer = new StringBuffer();
        SAXReader reader = new SAXReader();
        Document doc = reader.read(in);
        List<Node> textlist = CmsXmlGenericWrapper.selectNodes(doc, "//text:p[@*] | //text:span[@*]");
        Iterator<Node> li = textlist.iterator();
        while (li.hasNext()) {
            Node textNode = li.next();
            String text = textNode.getText();
            if (text.length() > 1) {
                text = " " + text + " ";
                resultBuffer.append(text);
            }
        }
        return resultBuffer.toString();
    }
725112
@Nonnull
    public String printLog4jEffectiveConfiguration() {
        try {
            StringWriter writer = new StringWriter();
            PropertyPrinter propertyPrinter = new PropertyPrinter(new PrintWriter(writer));
            propertyPrinter.print(new PrintWriter(writer));
            return writer.toString();
        } catch (RuntimeException e) {
            logger.warn("Exception generating log4j configuration", e);
            throw e;
        }
    }
455626
public function xmlOutput() {
        $o = '';
        $o.= '    <TABLE NAME="' . $this->name . '"';
        if ($this->comment) {
            $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"';
        }
        $o.= '>' . "\n";
        // Now the fields
        if ($this->fields) {
            $o.= '      <FIELDS>' . "\n";
            foreach ($this->fields as $field) {
                $o.= $field->xmlOutput();
            }
            $o.= '      </FIELDS>' . "\n";
        }
        // Now the keys
        if ($this->keys) {
            $o.= '      <KEYS>' . "\n";
            foreach ($this->keys as $key) {
                $o.= $key->xmlOutput();
            }
            $o.= '      </KEYS>' . "\n";
        }
        // Now the indexes
        if ($this->indexes) {
            $o.= '      <INDEXES>' . "\n";
            foreach ($this->indexes as $index) {
                $o.= $index->xmlOutput();
            }
            $o.= '      </INDEXES>' . "\n";
        }
        $o.= '    </TABLE>' . "\n";

        return $o;
    }
927760
public void generateXml(Element parent, I_CmsConfigurationParameterHandler config) {

        if (config != null) {
            Element elem = parent.addElement(m_name);
            for (String attrName : m_attrs) {
                String value = config.getConfiguration().get(attrName);
                if (value != null) {
                    elem.addAttribute(attrName, value);
                }
            }
        }
    }
397707
public String getString(String expression) {
		return (String) evalXPath(expression, null, XPathConstants.STRING);
	}
1296319
public String toXML()
    {
        String eol = SystemUtils.LINE_SEPARATOR;
        StringBuffer buf = new StringBuffer();

        // write all ClassDescriptors
        Iterator i = this.iterator();
        while (i.hasNext())
        {
            buf.append(((XmlCapable) i.next()).toXML() + eol);
        }
        return buf.toString();
    }
779266
protected Element getIndexingConfigurationDOM()
   {
      if (indexingConfiguration == null)
      {
         if (indexingConfigPath != null)
         {

            // File config = PrivilegedFileHelper.file(indexingConfigPath);
            SecurityHelper.doPrivilegedAction(new PrivilegedAction<Object>()
            {
               public Object run()
               {
                  InputStream is = SearchIndex.class.getResourceAsStream(indexingConfigPath);
                  if (is == null)
                  {
                     try
                     {
                        is = cfm.getInputStream(indexingConfigPath);
                     }
                     catch (Exception e1)
                     {
                        log.warn("Unable to load configuration " + indexingConfigPath);
                     }
                  }

                  try
                  {
                     DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     builder.setEntityResolver(new IndexingConfigurationEntityResolver());
                     String content = Deserializer.resolveVariables(Utils.readStream(is));
                     InputSource source = new InputSource(new StringReader(content));
                     indexingConfiguration = builder.parse(source).getDocumentElement();
                  }
                  catch (ParserConfigurationException e)
                  {
                     log.warn("Unable to create XML parser", e);
                  }
                  catch (IOException e)
                  {
                     log.warn("Exception parsing " + indexingConfigPath, e);
                  }
                  catch (SAXException e)
                  {
                     log.warn("Exception parsing " + indexingConfigPath, e);
                  }
                  return null;
               }
            });
         }
      }
      return indexingConfiguration;
   }
257052
public String toXml() {
        
        StringWriter writer = new StringWriter();
        JAXB.marshal(this, writer);
        writer.flush();
        
        return writer.toString();
        
    }