Examples of XmlUtilities


Examples of org.epic.core.util.XMLUtilities

    return entryTable;
  }

  public boolean performOk() {
    try {
      XMLUtilities xmlUtil = new XMLUtilities();
      xmlUtil.writeIncludeEntries(project, incPathList.getItems());
      return true;
    } catch (Exception e) {
      e.printStackTrace();
      return false;
    }
View Full Code Here

Examples of org.jasig.portal.xml.XmlUtilities

    protected void testXsltUpgrade(
            final Resource xslResource, final PortalDataKey dataKey,
            final Resource inputResource, final Resource expectedResultResource,
            final Resource xsdResource) throws Exception {

        final XmlUtilities xmlUtilities = new XmlUtilitiesImpl() {
            @Override
            public Templates getTemplates(Resource stylesheet) throws TransformerConfigurationException, IOException {
                final TransformerFactory transformerFactory = TransformerFactory.newInstance();
                return transformerFactory.newTemplates(new StreamSource(stylesheet.getInputStream()));
            }
        };
       
        final XsltDataUpgrader xsltDataUpgrader = new XsltDataUpgrader();
        xsltDataUpgrader.setPortalDataKey(dataKey);
        xsltDataUpgrader.setXslResource(xslResource);
        xsltDataUpgrader.setXmlUtilities(xmlUtilities);
        xsltDataUpgrader.afterPropertiesSet();
       
       
        //Create XmlEventReader (what the JaxbPortalDataHandlerService has)
        final XMLInputFactory xmlInputFactory = xmlUtilities.getXmlInputFactory();
        final XMLEventReader xmlEventReader = xmlInputFactory.createXMLEventReader(inputResource.getInputStream());
        final Node sourceNode = xmlUtilities.convertToDom(xmlEventReader);
        final DOMSource source = new DOMSource(sourceNode);
       
        final DOMResult result = new DOMResult();
        xsltDataUpgrader.upgradeData(source, result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.