Package com.mycila.xmltool

Examples of com.mycila.xmltool.XMLTag.forEachChild()


        ValidationResult res = tag.validate(HEADER_STYLES_SCHEMA);
        if (res.hasError()) {
            throw new LicenseManagerException("Style definition at '" + styleLocation + "' is not valid: " + res.getErrorMessages()[0]);
        }
        final String ns = tag.getPefix("http://mycila.com/license/styles/1.0");
        tag.forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                Builder builder = add(doc.getAttribute("name"))
                        .defineBegining(doc.getTextOrCDATA("%1$s:definition/%1$s:begining", ns))
                        .defineStartLine(doc.getTextOrCDATA("%1$s:definition/%1$s:startLine", ns))
                        .defineEnding(doc.getTextOrCDATA("%1$s:definition/%1$s:ending", ns))
View Full Code Here


        XMLTag tag = XMLDoc.from(mappingLocation, false);
        ValidationResult res = tag.validate(DOCUMENT_TYPES_SCHEMA);
        if (res.hasError()) {
            throw new LicenseManagerException("Mapping definition at '" + mappingLocation + "' is not valid: " + res.getErrorMessages()[0]);
        }
        tag.forEachChild(new CallBack() {
            public void execute(XMLTag doc) {
                map(doc.getAttribute("extension")).to(headerStyles.getByName(doc.getAttribute("style")));
            }
        });
        return this;
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.