Examples of XMLNode

  • org.sf.bee.commons.xml.XmlNode
  • org.vietspider.parser.xml.XMLNode
    Created by VietSpider Studio Author : Nhu Dinh Thuan nhudinhthuan@yahoo.com Mar 13, 2006
  • org.webharvest.definition.XmlNode
  • org.zachtaylor.jnodalxml.XmlNode

  • Examples of cli.System.Xml.XmlNode

         * @return the result of the conversion if the object can be converted, or null otherwise
         */

        public Value convertObjectToXPathValue(Object object, Configuration config) throws XPathException {
            if (object instanceof XmlNode) {
                XmlNode node = (XmlNode)object;
                DocumentWrapper dw = new DocumentWrapper(
                        node.get_OwnerDocument(),  node.get_BaseURI(), config);
                NodeWrapper nw = dw.wrap(node);
                return new SingletonItem(nw);
            } else if (isXdmValue(object)) {
                return Value.asValue(unwrapXdmValue(object));
            } else {
    View Full Code Here

    Examples of com.btaz.util.reader.xml.nodes.XmlNode

         * @return {@code boolean} true if found
         */
        public boolean find(String xmlPathQuery) {
            XmlPath xmlPath = XmlPathParser.parse(xmlPathQuery);

            XmlNode node;
            while((node = pullXmlNode()) != null) {
                if(node instanceof XmlStartElement) {
                    XmlStartElement startElement = (XmlStartElement) node;
                    Element element = new Element(startElement.getLocalName());
                    element.addAttributes(startElement.getAttributes());
    View Full Code Here

    Examples of com.btaz.util.xml.nodes.XmlNode

         * @return {@code boolean} true if found
         */
        public boolean find(String xmlPathQuery) {
            XmlPath xmlPath = XmlPathParser.parse(xmlPathQuery);

            XmlNode node;
            while((node = pullXmlNode()) != null) {
                if(node instanceof XmlStartElement) {
                    XmlStartElement startElement = (XmlStartElement) node;
                    Element element = new Element(startElement.getLocalName());
                    element.addAttributes(startElement.getAttributes());
    View Full Code Here

    Examples of com.dtrules.mapping.XMLNode

          @Override
                public void execute(DTState state) throws RulesException {
            IRObject  value     = state.datapop();
            IRObject  attribute = state.datapop();
            XMLNode   xmlNode   = state.datapop().xmlTagValue();
            if(xmlNode != null){
                state.traceInfo("SetXmlAttribute","tag",xmlNode.getTag(),"attribute",attribute.stringValue(),"value",value.stringValue(), null);
                xmlNode.getAttribs().put(attribute.stringValue(), value.stringValue());
            }
          }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

         */
        public PlanarImage getImage( ImageInfo imageInfo, ProgressThread thread )
            throws BadImageFileException, IOException, UserCanceledException
        {
            final XmlDocument xml = getDocument( imageInfo );
            final XmlNode cache = getCacheNode( xml );
            final byte[] bytes = cache.getData();
            if (bytes == null) {
                // no cache data in the file
                throw new BadImageFileException( imageInfo.getFile() );
            }
            try {
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

                    90
                );
                writer.putImage( image );

                final XmlDocument xml = getDocument( imageInfo );
                final XmlNode cache = getCacheNode( xml );
                cache.setData( buf.toByteArray() );

                final OutputStream out =
                    new FileOutputStream( imageInfo.getFile() );
                try {
                    xml.write( out );
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

         * @return The XmlNode containing the LZN cache data, or a new cache node
         * if none was present.
         */
        private static XmlNode getCacheNode( XmlDocument xml ) {
            // Parse the LZN file and locate the cache node:
            final XmlNode root = xml.getRoot();
            try {
                return root.getChild(CacheTag);
            }
            catch (XMLException e) {
                return root.addChild(CacheTag);
            }
        }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

            root.setAttribute(IntentTag, intent.toString());

            root.setAttribute(PpiTag, Integer.toString(pixelsPerInch));

            if (profile != null) {
                XmlNode profileNode = root.addChild(ProfileTag);
                profileNode.setAttribute(ProfileNameTag, profile.getName());
                profileNode.setAttribute(ProfilePathTag, profile.getPath());
            }
            XmlNode pageNode = root.addChild(PageTag);
            savePageFormat(pageNode);

            XmlNode imageRectNode = root.addChild(ImageRectTag);
            imageRectNode.setAttribute("x", Double.toString(imageRect.getX()));
            imageRectNode.setAttribute("y", Double.toString(imageRect.getY()));
            imageRectNode.setAttribute("w", Double.toString(imageRect.getWidth()));
            imageRectNode.setAttribute("h", Double.toString(imageRect.getHeight()));

        }
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

            else {
                // arbitrary but sensible default, mostly backwards compatible
                pixelsPerInch = 300;
            }
            profile = null;
            XmlNode profileNode = null;
            try {
                profileNode = root.getChild(ProfileTag);
            }
            catch (XMLException e) {
                // OK, color profile is optional.
            }
            if (profileNode != null) {
                String profileName = profileNode.getAttribute(ProfileNameTag);
                String profilePath = profileNode.getAttribute(ProfilePathTag);
                profile = new ColorProfileInfo(profileName, profilePath);
            }
            XmlNode pageNode = root.getChild(PageTag);
            restorePageFormat(pageNode);

            XmlNode imageRectNode = root.getChild(ImageRectTag);
            try {
                double x = Double.valueOf(imageRectNode.getAttribute("x"));
                double y = Double.valueOf(imageRectNode.getAttribute("y"));
                double w = Double.valueOf(imageRectNode.getAttribute("w"));
                double h =
                    Double.valueOf(imageRectNode.getAttribute("h"));
                imageRect = new Rectangle2D.Double(x, y, w, h);

                // The restored imageRect may not make sense with the current
                // imageWidth and imageHeight.
                // If the saved aspect ratio is far off, then we scaleToFit().
    View Full Code Here

    Examples of com.lightcrafts.utils.xml.XmlNode

        private void savePageFormat(XmlNode pageRoot) {
            int orientation = pageFormat.getOrientation();
            pageRoot.setAttribute(OrientationTag, Integer.toString(orientation));

            Paper paper = pageFormat.getPaper();
            XmlNode paperNode = pageRoot.addChild(PaperTag);

            paperNode.setAttribute(
                "width", Double.toString(paper.getWidth())
            );
            paperNode.setAttribute(
                "height", Double.toString(paper.getHeight())
            );
            paperNode.setAttribute(
                "x", Double.toString(paper.getImageableX())
            );
            paperNode.setAttribute(
                "y", Double.toString(paper.getImageableY())
            );
            paperNode.setAttribute(
                "w", Double.toString(paper.getImageableWidth())
            );
            paperNode.setAttribute(
                "h", Double.toString(paper.getImageableHeight())
            );
        }
    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.