本文整理汇总了Java中com.sun.org.apache.xerces.internal.xni.XMLString.clear方法的典型用法代码示例。如果您正苦于以下问题:Java XMLString.clear方法的具体用法?Java XMLString.clear怎么用?Java XMLString.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xerces.internal.xni.XMLString
的用法示例。
在下文中一共展示了XMLString.clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scanAttDefaultDecl
import com.sun.org.apache.xerces.internal.xni.XMLString; //导入方法依赖的package包/类
/**
* Scans an attribute default declaration
* <p>
* <pre>
* [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
* </pre>
*
* @param name The name of the attribute being scanned.
* @param defaultVal The string to fill in with the default value.
*/
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {
String defaultType = null;
fString.clear();
defaultVal.clear();
if (fEntityScanner.skipString("#REQUIRED")) {
defaultType = "#REQUIRED";
}
else if (fEntityScanner.skipString("#IMPLIED")) {
defaultType = "#IMPLIED";
}
else {
if (fEntityScanner.skipString("#FIXED")) {
defaultType = "#FIXED";
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
new Object[]{elName, atName});
}
}
// AttValue
boolean isVC = !fStandalone && (fSeenExternalDTD || fSeenExternalPE) ;
scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
fAttributes, 0, isVC);
}
return defaultType;
}
示例2: scanAttDefaultDecl
import com.sun.org.apache.xerces.internal.xni.XMLString; //导入方法依赖的package包/类
/**
* Scans an attribute default declaration
* <p>
* <pre>
* [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
* </pre>
*
* @param name The name of the attribute being scanned.
* @param defaultVal The string to fill in with the default value.
*/
protected final String scanAttDefaultDecl(String elName, String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {
String defaultType = null;
fString.clear();
defaultVal.clear();
if (fEntityScanner.skipString("#REQUIRED")) {
defaultType = "#REQUIRED";
}
else if (fEntityScanner.skipString("#IMPLIED")) {
defaultType = "#IMPLIED";
}
else {
if (fEntityScanner.skipString("#FIXED")) {
defaultType = "#FIXED";
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL",
new Object[]{elName, atName});
}
}
// AttValue
boolean isVC = !fStandalone && (fSeenExternalDTD || fSeenExternalPE) ;
scanAttributeValue(defaultVal, nonNormalizedDefaultVal, atName,
fAttributes, 0, isVC, elName, false);
}
return defaultType;
}