本文整理了Java中org.htmlparser.Attribute.getQuote()
方法的一些代码示例,展示了Attribute.getQuote()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Attribute.getQuote()
方法的具体详情如下:
包路径:org.htmlparser.Attribute
类名称:Attribute
方法名:getQuote
[英]Get the quote, if any, surrounding the value of the attribute, if any.
[中]获取围绕属性值(如果有)的引号(如果有)。
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Get the raw value of the attribute.
* The part after the equals sign, or the text if it's just a whitepace
* 'attribute'. This includes the quotes around the value if any.
* @param buffer The string buffer to append the attribute value to.
* @see #getRawValue()
*/
public void getRawValue (StringBuilder buffer)
{
getQuote (buffer);
getValue (buffer);
getQuote (buffer);
}
代码示例来源:origin: org.htmlparser/htmllexer
/**
* Get the raw value of the attribute.
* The part after the equals sign, or the text if it's just a whitepace
* 'attribute'. This includes the quotes around the value if any.
* @param buffer The string buffer to append the attribute value to.
* @see #getRawValue()
* @see #setRawValue
*/
public void getRawValue (StringBuffer buffer)
{
getQuote (buffer);
getValue (buffer);
getQuote (buffer);
}
代码示例来源:origin: org.htmlparser/htmllexer
/**
* Get the raw value of the attribute.
* The part after the equals sign, or the text if it's just a whitepace
* 'attribute'. This includes the quotes around the value if any.
* @return The value, or <code>null</code> if it's a stand-alone attribute,
* or the text if it's just a whitepace 'attribute'.
*/
public String getRawValue ()
{
char quote;
StringBuffer buffer;
String ret;
ret = getValue ();
if (null != ret && (0 != (quote = getQuote ())))
{
buffer = new StringBuffer (ret.length() + 2);
buffer.append (quote);
buffer.append (ret);
buffer.append (quote);
ret = buffer.toString ();
}
return (ret);
}
代码示例来源:origin: org.htmlparser/htmllexer
if (0 != (quote = getQuote ()))
buffer.append (quote);
if (mValueStart != mValueEnd)
if (0 != (quote = getQuote ()))
buffer.append (quote);
buffer.append (mValue);
代码示例来源:origin: org.fitnesse/fitnesse
private static Vector cloneAttributes(Vector<Attribute> attributes) {
Vector<Attribute> newAttributes = new Vector<>(attributes.size());
for (Attribute a : attributes) {
newAttributes.add(new Attribute(a.getName(), a.getAssignment(), a.getValue(), a.getQuote()));
}
return newAttributes;
}
代码示例来源:origin: com.github.tcnh/fitnesse
private static Vector cloneAttributes(Vector<Attribute> attributes) {
Vector<Attribute> newAttributes = new Vector<>(attributes.size());
for (Attribute a : attributes) {
newAttributes.add(new Attribute(a.getName(), a.getAssignment(), a.getValue(), a.getQuote()));
}
return newAttributes;
}
代码示例来源:origin: org.htmlparser/htmllexer
quote = getQuote ();
if (0 != quote)
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Get the raw value of the attribute.
* The part after the equals sign, or the text if it's just a whitepace
* 'attribute'. This includes the quotes around the value if any.
* @return The value, or <code>null</code> if it's a stand-alone attribute,
* or the text if it's just a whitepace 'attribute'.
*/
public String getRawValue ()
{
char quote;
StringBuilder buffer;
String ret;
if (isValued ())
{
quote = getQuote ();
if (0 != quote)
{
buffer = new StringBuilder (); // todo: what is the value length?
buffer.append (quote);
getValue (buffer);
buffer.append (quote);
ret = buffer.toString ();
}
else
ret = getValue ();
}
else
ret = null;
return (ret);
}
代码示例来源:origin: org.htmlparser/htmllexer
/**
* Get the length of the string value of this attribute.
* @return The number of characters required to express this attribute.
*/
public int getLength ()
{
String name;
String assignment;
String value;
char quote;
int ret;
ret = 0;
name = getName ();
if (null != name)
ret += name.length ();
assignment = getAssignment ();
if (null != assignment)
ret += assignment.length ();
value = getValue ();
if (null != value)
ret += value.length ();
quote = getQuote ();
if (0 != quote)
ret += 2;
return (ret);
}
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
/**
* Get the length of the string value of this attribute.
* @return The number of characters required to express this attribute.
*/
public int getLength ()
{
String name;
String assignment;
String value;
char quote;
int ret;
ret = 0;
name = getName ();
if (null != name)
ret += name.length ();
assignment = getAssignment ();
if (null != assignment)
ret += assignment.length ();
value = getValue ();
if (null != value)
ret += value.length ();
quote = getQuote ();
if (0 != quote)
ret += 2;
return (ret);
}
代码示例来源:origin: org.htmlparser/htmllexer
else if ((null != mPage) && (0 <= mValueStart) && (0 <= mValueEnd))
ret += mValueEnd - mValueStart;
quote = getQuote ();
if (0 != quote)
ret += 2;
代码示例来源:origin: com.bbossgroups/bboss-htmlparser
if ((null == zeroth.getValue ()) && (0 == zeroth.getQuote ()))
attributes.set(0,attribute);
else
代码示例来源:origin: org.htmlparser/htmllexer
if ((null == zeroth.getValue ()) && (0 == zeroth.getQuote ()))
attributes.setElementAt (attribute, 0);
else
代码示例来源:origin: org.htmlparser/htmllexer
length++;
if ((null != attribute.getValue ()) && (0 == attribute.getQuote ()))
attributes.insertElementAt (new Attribute (" "), length - 1);
replaced = true;
内容来源于网络,如有侵权,请联系作者删除!