Gets the XML element that represents the string patterns

@return
760847
public Element getStringPatternsElement() {
        final Element referenceDataCatalogElement = getReferenceDataCatalogElement();

        final Element stringPatternsElement =
                getOrCreateChildElementByTagName(referenceDataCatalogElement, "string-patterns");
        if (stringPatternsElement == null) {
            throw new IllegalStateException("Could not find <string-patterns> element in configuration file");
        }
        return stringPatternsElement;
    }
1334822
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(USAGES);

        return (elements.elements());
    }
1289113
public String toXML() {
        StringBuilder buf = new StringBuilder();
        buf.append("<item");
        if (this.isAllow()) {
        	buf.append(" action=\"allow\"");
        } else {
        	buf.append(" action=\"deny\"");
        }
        buf.append(" order=\"").append(getOrder()).append('"');
        if (getType() != null) {
            buf.append(" type=\"").append(getType()).append('"');
        }
        if (getValue() != null) {
            buf.append(" value=\"").append(getValue()).append('"');
        }
        if (isFilterEverything()) {
        	buf.append("/>");
        } else {
        	buf.append('>');
        	if (this.isFilterIQ()) {
            	buf.append("<iq/>");
            }
        	if (this.isFilterMessage()) {
            	buf.append("<message/>");
            }
        	if (this.isFilterPresenceIn()) {
            	buf.append("<presence-in/>");
            }
        	if (this.isFilterPresenceOut()) {
            	buf.append("<presence-out/>");
            }
        	buf.append("</item>");
        }
        // CHECKSTYLE:ON
        return buf.toString();
    }
1189040
public String toXML() {
        String xml = MARSHALLER.toXML(this);
        return KMODULE_XSD + xml.substring("<kmodule".length());  // 
    }
1079628
private String getIndex() {

        try {
            return parseMandatoryStringValue(XML_ELEMENT_INDEX);
        } catch (final Exception e) {
            LOG.info(Messages.get().getBundle().key(Messages.LOG_NO_INDEX_SPECIFIED_0), e);
            return null;
        }
    }
982492
public java.lang.String getXmlns() {
        return (java.lang.String) getStateHelper().eval(PropertyKeys.xmlns);

    }
1098976
public function getPattern()
    {
        $pattern = null;

        if ($patternNodes = $this->element->getElementsByTagName('pattern')) {
            if ($patternNodes->length > 0) {
                $pattern = $patternNodes->item(0)->getAttribute('value');
            }
        }

        return $pattern;
    }
974047
def to_xml_string(str = '')
      str << ('<patternFill patternType="' << patternType.to_s << '">')
      if fgColor.is_a?(Color)
        fgColor.to_xml_string str, "fgColor"
      end

      if bgColor.is_a?(Color)
        bgColor.to_xml_string str, "bgColor"
      end
      str << '</patternFill>'
    end
218597
public Enumeration<String> getElements() {
        AttributeNameEnumeration elements = new AttributeNameEnumeration();
        elements.addElement(VERSION);

        return (elements.elements());
    }
684130
static String getXmlProlog(final InputStream is, final String guessedEnc) throws IOException {
        String encoding = null;
        if (guessedEnc != null) {
            final byte[] bytes = new byte[BUFFER_SIZE];
            is.mark(BUFFER_SIZE);
            int offset = 0;
            int max = BUFFER_SIZE;
            int c = is.read(bytes, offset, max);
            int firstGT = -1;
            while (c != -1 && firstGT == -1 && offset < BUFFER_SIZE) {
                offset += c;
                max -= c;
                c = is.read(bytes, offset, max);
                firstGT = new String(bytes, 0, offset, guessedEnc).indexOf(">");
            }
            if (firstGT == -1) {
                if (c == -1) {
                    throw new IOException("Unexpected end of XML stream");
                } else {
                    throw new IOException("XML prolog or ROOT element not found on first " + offset + " bytes");
                }
            }
            final int bytesRead = offset;
            if (bytesRead > 0) {
                is.reset();
                String prolog = new String(bytes, guessedEnc).substring(0, firstGT);
                final Matcher m = ENCODING_PATTERN.matcher(prolog);
                if (m.find()) {
                    encoding = m.group(1).toUpperCase(Locale.ENGLISH);
                    encoding = encoding.substring(1, encoding.length() - 1);
                }
            }
        }
        return encoding;
    }
1365079
private static XmlPullParser getXmlPullParser() {
        SoftReference<XmlPullParser> ref = XPP_PARSER.get();
        XmlPullParser result = ref.get();
        if (result == null) {
            Exception thrown;
            try {
                XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
                factory.setNamespaceAware(true);
                factory.setValidating(false);
                result = factory.newPullParser();
                ref = new SoftReference<XmlPullParser>(result);
                XPP_PARSER.set(ref);
                return result;
            } catch (Exception ex) {
                thrown = ex;
            }
            throw(new IllegalStateException(
                    "Could not create XmlPull parser", thrown));
        } else {
            return result;
        }
    }
1088805
public static Element stringToElement(String xml) throws Exception {
      ByteArrayInputStream bais = new ByteArrayInputStream(xml.getBytes("utf8"));
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document d = builder.parse(bais);
      bais.close();
      return d.getDocumentElement();
   }
1026998
public String toXML()
    {
        RepositoryTags tags = RepositoryTags.getInstance();
        String eol = System.getProperty( "line.separator" );

        // opening tag
        StringBuffer result = new StringBuffer( 1024 );
        result.append( "      " );
        result.append( tags.getOpeningTagNonClosingById( REFERENCE_DESCRIPTOR ) );
        result.append( eol );

        // attributes
        // name
        String name = this.getAttributeName();
        if( name == null )
        {
            name = RepositoryElements.TAG_SUPER;
        }
        result.append( "        " );
        result.append( tags.getAttribute( FIELD_NAME, name ) );
        result.append( eol );

        // class-ref
        result.append( "        " );
        result.append( tags.getAttribute( REFERENCED_CLASS, this.getItemClassName() ) );
        result.append( eol );

        // proxyReference is optional
        if( isLazy() )
        {
            result.append( "        " );
            result.append( tags.getAttribute( PROXY_REFERENCE, "true" ) );
            result.append( eol );
            result.append( "        " );
            result.append( tags.getAttribute( PROXY_PREFETCHING_LIMIT, "" + this.getProxyPrefetchingLimit() ) );
            result.append( eol );
        }

        //reference refresh is optional, disabled by default
        if( isRefresh() )
        {
            result.append( "        " );
            result.append( tags.getAttribute( REFRESH, "true" ) );
            result.append( eol );
        }

        //auto retrieve
        result.append( "        " );
        result.append( tags.getAttribute( AUTO_RETRIEVE, "" + getCascadeRetrieve() ) );
        result.append( eol );

        //auto update
        result.append( "        " );
        result.append( tags.getAttribute( AUTO_UPDATE, getCascadeAsString( getCascadingStore() ) ) );
        result.append( eol );

        //auto delete
        result.append( "        " );
        result.append( tags.getAttribute( AUTO_DELETE, getCascadeAsString( getCascadingDelete() ) ) );
        result.append( eol );

        //otm-dependent is optional, disabled by default
        if( getOtmDependent() )
        {
            result.append( "        " );
            result.append( tags.getAttribute( OTM_DEPENDENT, "true" ) );
            result.append( eol );
        }

        // close opening tag
        result.append( "      >" );
        result.append( eol );

        // elements
        // write foreignkey elements
        for( int i = 0; i < getForeignKeyFields().size(); i++ )
        {
            Object obj = getForeignKeyFields().get( i );
            if( obj instanceof Integer )
            {
                String fkId = obj.toString();
                result.append( "        " );
                result.append( tags.getOpeningTagNonClosingById( FOREIGN_KEY ) );
                result.append( " " );
                result.append( tags.getAttribute( FIELD_ID_REF, fkId ) );
                result.append( "/>" );
                result.append( eol );
            }
            else
            {
                String fk = ( String ) obj;
                result.append( "        " );
                result.append( tags.getOpeningTagNonClosingById( FOREIGN_KEY ) );
                result.append( " " );
                result.append( tags.getAttribute( FIELD_REF, fk ) );
                result.append( "/>" );
                result.append( eol );
            }
        }

        // closing tag
        result.append( "      " );
        result.append( tags.getClosingTagById( REFERENCE_DESCRIPTOR ) );
        result.append( eol );
        return result.toString();
    }
475533
def getXML(self):
        
        xml='<'+self._elementName+' '
        for key,value in list(self._attributes.items()):
            if value != None:
                xml+=key+'="'+self.quote_attrib(str(value))+'" '
        if  len(self._subElements)==0: #self._textContent==None and
            xml+=' />\n'
        else:
            xml+=' >\n'
            #if self._textContent==None:
            for subelement in self._subElements:
                s = subelement.getXML()
                if type(s) != str:
                    s = str(s)
                xml+=s
               # xml+=str(subelement.getXML())
            #else:
            #if self._textContent!=None:
            #    xml+=self._textContent
            xml+='</'+self._elementName+'>\n'
        #print xml
        return xml
1148977
public static String trimElements(String xml) {
        String result = xml.trim();
        Matcher matcher = ELEMENT_CONTENT_PATTERN.matcher(result);
        return matcher.replaceAll(">$1<");
    }
429429
public String getXML()
    {
        Object root = null;
        if (m_message != null)
            root = m_message.getRawData();
        if (root != null)
        {
            try {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                String strSOAPPackage = (String)((TrxMessageHeader)this.getMessage().getMessageHeader()).get(SOAPMessageTransport.SOAP_PACKAGE);
    
                Marshaller m = JaxbContexts.getJAXBContexts().getMarshaller(strSOAPPackage);
                if (m == null)
                    return null;
                synchronized(m)
                {   // Since the marshaller is shared (may want to tweek this for multi-cpu implementations)
                    m.marshal( root, out );
                }
                String strXML = out.toString(Constants.STRING_ENCODING);
                return strXML;
            } catch (IOException ex)  {
                ex.printStackTrace();   // Never
            } catch (JAXBException ex)   {
                ex.printStackTrace();
            } catch (java.lang.IllegalArgumentException ex)   {
                ex.printStackTrace();
            }
        }
        return null;
    }
244058
def get_xml(self):
        
        with io.StringIO() as string:
            string.write(ET.tostring(self.root, encoding="unicode"))
            return string.getvalue()