org.sakaiproject.util.Xml.decodeAttribute()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.sakaiproject.util.Xml.decodeAttribute()方法的一些代码示例,展示了Xml.decodeAttribute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Xml.decodeAttribute()方法的具体详情如下:
包路径:org.sakaiproject.util.Xml
类名称:Xml
方法名:decodeAttribute

Xml.decodeAttribute介绍

[英]Decode a string from the attribute of the element , that was made using encodeAttribute().
[中]解码使用encodeAttribute()生成的元素属性中的字符串。

代码示例

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

public String decodeFormattedTextAttribute(Element element, String baseAttributeName)
{
  String ret;
  // first check if an HTML-encoded attribute exists, for example "foo-html", and use it if available
  ret = StringUtils.trimToNull(Xml.decodeAttribute(element, baseAttributeName + "-html"));
  if (ret != null) return ret;
  // next try the older kind of formatted text like "foo-formatted", and convert it if found
  ret = StringUtils.trimToNull(Xml.decodeAttribute(element, baseAttributeName + "-formatted"));
  ret = convertOldFormattedText(ret);
  if (ret != null) return ret;
  // next try just a plaintext attribute and convert the plaintext to formatted text if found
  // convert from old plaintext instructions to new formatted text instruction
  ret = Xml.decodeAttribute(element, baseAttributeName);
  ret = convertPlaintextToFormattedText(ret);
  return ret;
}

代码示例来源:origin: sakaiproject/sakai

if ("BASE64".equalsIgnoreCase(enc))
  value = decodeAttribute(element, "value");

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

if (m_description == null)
  m_description = StringUtils.trimToNull(Xml.decodeAttribute(el, "description-enc"));

代码示例来源:origin: sakaiproject/sakai

if ("BASE64".equalsIgnoreCase(enc))
  value = Xml.decodeAttribute(element, "value");

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

creatorId = Xml.decodeAttribute(element4, "CHEF:creator");
modifierId = Xml.decodeAttribute(element4, "CHEF:modifiedby");

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

creatorId = Xml.decodeAttribute(element4, "CHEF:creator");
modifierId = Xml.decodeAttribute(element4, "CHEF:modifiedby");

代码示例来源:origin: org.sakaiproject.mailarchive/sakai-mailarchive-impl

m_html_body = Xml.decodeAttribute(el, "body-html");
m_body      = Xml.decodeAttribute(el, "body");

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

String subject = Xml.decodeAttribute(msgChildEl, "subject");
String body = Xml.decodeAttribute(msgChildEl, "body");
msgs.add(new org.sakaiproject.email.impl.DigestMessage(m_id, subject, body));

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

String creatorId = Xml.decodeAttribute(element3, "value");
if (!userListAllowImport.contains(creatorId)) goAhead = false;

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

String creatorId = Xml.decodeAttribute(element6, "value");
if (!userListAllowImport.contains(creatorId)) goAhead = false;

代码示例来源:origin: org.sakaiproject/sakai-chat-impl

String body = Xml.decodeAttribute(root, "body");

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

if (tmpDesc == null)
  tmpDesc = StringUtils.trimToNull(Xml.decodeAttribute(el,
      "description-enc"));
if (tmpShortDesc == null)
  tmpShortDesc = StringUtils.trimToNull(Xml.decodeAttribute(el,
      "short-description-enc"));

相关文章