Package com.liferay.util.xml.descriptor

Examples of com.liferay.util.xml.descriptor.XMLDescriptor


    SAXReader reader = new SAXReader();

    Document masterDoc = reader.read(new StringReader(masterXml));
    Document slaveDoc = reader.read(new StringReader(slaveXml));

    XMLDescriptor descriptor = null;
    if (_descriptorClassName.equals(_AUTO_DESCRIPTOR)) {
      descriptor = XMLTypeDetector.determineType(doctype, masterDoc);
    }
    else {
      descriptor = (XMLDescriptor)Class.forName(
View Full Code Here


    new TilesDefsDescriptor(), new WebXMLDescriptor()
  };

  public static XMLDescriptor determineType(String doctype, Document root) {
    for (int i = 0; i < REGISTERED_DESCRIPTORS.length; i++) {
      XMLDescriptor descriptor = REGISTERED_DESCRIPTORS[i];

      if (descriptor.canHandleType(doctype, root)) {
        return descriptor;
      }
    }

    return new StrictXMLDescriptor();
View Full Code Here

TOP

Related Classes of com.liferay.util.xml.descriptor.XMLDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.