本文整理匯總了Java中org.jdom.IllegalNameException類的典型用法代碼示例。如果您正苦於以下問題:Java IllegalNameException類的具體用法?Java IllegalNameException怎麽用?Java IllegalNameException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IllegalNameException類屬於org.jdom包,在下文中一共展示了IllegalNameException類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: xppToElement
import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element xppToElement(Xpp3Dom xpp) throws RemoteException {
Element result;
try {
result = new Element(xpp.getName());
}
catch (IllegalNameException e) {
Maven3ServerGlobals.getLogger().info(e);
return null;
}
Xpp3Dom[] children = xpp.getChildren();
if (children == null || children.length == 0) {
result.setText(xpp.getValue());
}
else {
for (Xpp3Dom each : children) {
Element child = xppToElement(each);
if (child != null) result.addContent(child);
}
}
return result;
}
示例2: xppToElement
import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element xppToElement(Xpp3Dom xpp) throws RemoteException {
Element result;
try {
result = new Element(xpp.getName());
}
catch (IllegalNameException e) {
Maven2ServerGlobals.getLogger().info(e);
return null;
}
Xpp3Dom[] children = xpp.getChildren();
if (children == null || children.length == 0) {
result.setText(xpp.getValue());
}
else {
for (Xpp3Dom each : children) {
Element child = xppToElement(each);
if (child != null) result.addContent(child);
}
}
return result;
}
示例3: convertXpp
import org.jdom.IllegalNameException; //導入依賴的package包/類
private static Element convertXpp(Xpp3Dom xpp3Dom) {
Element result;
try {
result = new Element(xpp3Dom.getName());
} catch (IllegalNameException e) {
return null;
}
Xpp3Dom[] children = xpp3Dom.getChildren();
if (children == null || children.length == 0) {
result.setText(xpp3Dom.getValue());
} else {
for (Xpp3Dom child : children) {
Element element = convertXpp(child);
if (element != null) {
result.addContent(element);
}
}
}
return result;
}