Package org.htmlparser

Examples of org.htmlparser.Attribute


        String name;
        Vector attributes;
       
        name = "/" + tag.getRawTagName ();
        attributes = new Vector ();
        attributes.addElement (new Attribute (name, (String)null));
        ret = lexer.getNodeFactory ().createTagNode (
                                    page, position, position, attributes);
       
        return (ret);
    }
View Full Code Here


        String language;
        String code;
        Node content;
        int position;
        Node node;
        Attribute attribute;
        Vector vector;

        if (tag instanceof ScriptTag)
        {
            language = ((ScriptTag)tag).getLanguage ();
            if ((null != language) &&
                (language.equalsIgnoreCase ("JScript.Encode") ||
                 language.equalsIgnoreCase ("VBScript.Encode")))
            {
                code = ScriptDecoder.Decode (lexer.getPage (), lexer.getCursor ());
                ((ScriptTag)tag).setScriptCode (code);
            }
        }
        content = lexer.parseCDATA (!STRICT);
        position = lexer.getPosition ();
        node = lexer.nextNode (false);
        if (null != node)
            if (!(node instanceof Tag) || !(   ((Tag)node).isEndTag ()
                && ((Tag)node).getTagName ().equals (tag.getIds ()[0])))
            {
                lexer.setPosition (position);
                node = null;
            }

        // build new end tag if required
        if (null == node)
        {
            attribute = new Attribute ("/script", null);
            vector = new Vector ();
            vector.addElement (attribute);
            node = lexer.getNodeFactory ().createTagNode (
                lexer.getPage (), position, position, vector);
        }
View Full Code Here

    private boolean isOpenClose(org.htmlparser.Tag tag) {
        if (tag.getRawTagName().endsWith("/")) {
            return true;
        } else {
            List<?> atts = tag.getAttributesEx();
            Attribute a = (Attribute) atts.get(atts.size() - 1);
            return a.getName() != null && a.getName().equals("/");
        }
    }
View Full Code Here

TOP

Related Classes of org.htmlparser.Attribute

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.