本文整理汇总了C++中DOMAttr::setValue方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMAttr::setValue方法的具体用法?C++ DOMAttr::setValue怎么用?C++ DOMAttr::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOMAttr
的用法示例。
在下文中一共展示了DOMAttr::setValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toXML
DOMElement* EppCommandInfoLaunchRegistration::toXML( DOMDocument& doc, const DOMString& tag )
{
DOMElement* elm;
DOMElement* body = EppUtil::createElementNS(doc, "launch", (tag.isNull()) ? "info" : tag, false, "-1.0");
DOMAttr* attr = doc.createAttribute(XS("includeMark"));
attr->setValue( ( this->_includeMark ) ? XS("true") : XS("false") );
body->setAttributeNode(attr);
if( this->_phase.phase().length() > 0 )
{
DOMElement* elm = this->_phase.toXML(doc, "phase");
body->appendChild(elm);
}
if( this->_appId.isNotNull() )
{
if( this->_appId.length() > 0 )
{
elm = doc.createElement(XS("applicationID"));
elm->appendChild(doc.createTextNode(this->_appId));
body->appendChild(elm);
}
}
return body;
}
示例2:
void SYSTEM::CConfigItem::SetProperties(const char * propName, const char * value)
{
if(!propName||!value)
{
return;
}
if(((DOMElement*)itemElement)->hasAttributes())
{
DOMNamedNodeMap *pAttributes = ((DOMElement*)itemElement)->getAttributes();
XMLCh *t = XMLString::transcode(propName);
DOMAttr *pAttributeNode = (DOMAttr*)pAttributes->getNamedItem(t);
XMLString::release(&t);
if(!pAttributeNode)
{
return; //属性名错误,抛出异常
}
t = XMLString::transcode(value);
pAttributeNode->setValue(t);
XMLString::release(&t);
}
else
{
return;
}
}
示例3: toXML
DOMElement* EppCommandTransferDomain::toXML( DOMDocument& doc, const DOMString& tag )
{
DOMElement* body = toXMLPoll(doc, tag);
DOMAttr* attr = doc.createAttribute(XS("op"));
attr->setValue(this->getOperation());
ValueVectorOf<DOMAttr*> attrList(1);
attrList.addElement(attr);
return toXMLCommon(doc, tag, body, &attrList);
}
示例4: toXML
DOMElement* EppCommandCreateLaunchRegistration::toXML( DOMDocument& doc, const DOMString& tag )
{
DOMElement* elm;
DOMElement* body = EppUtil::createElementNS(doc, "launch", (tag.isNull()) ? "create" : tag, false, "-1.0");
if( this->_type.length() > 0 )
{
DOMAttr* attr = doc.createAttribute(XS("type"));
attr->setValue( this->_type);
body->setAttributeNode(attr);
}
if ( this->_phase.phase().length() > 0 )
{
DOMElement* elm = this->_phase.toXML(doc, "phase");
body->appendChild(elm);
}
if( (_signedMark.hasSMD()) )
{ /*RAII*/
DOMElement* elm = this->_signedMark.toXML(doc, "signedMark");
body->appendChild(elm);
}
if( (_encSignedMark.hasSMD()) )
{ /*RAII*/
DOMElement* elm = this->_encSignedMark.toXML(doc, "encodedSignedMark");
body->appendChild(elm);
}
if( this->_noticeID.length() > 0 )
{
elm = doc.createElement(XS("noticeID"));
elm->appendChild(doc.createTextNode(this->_noticeID));
body->appendChild(elm);
}
if( this->_notAfter.length() > 0 )
{
elm = doc.createElement(XS("notAfter"));
elm->appendChild(doc.createTextNode(this->_notAfter));
body->appendChild(elm);
}
if( this->_acceptedDate.length() > 0 )
{
elm = doc.createElement(XS("acceptedDate"));
elm->appendChild(doc.createTextNode(this->_acceptedDate));
body->appendChild(elm);
}
return body;
}
示例5: toXML
DOMElement* EppLaunchPhase::toXML(DOMDocument &doc, const DOMString &tag)
{
//DOMElement* elm;
DOMElement* body = doc.createElement(tag);
if( this->_sub_phase.length() > 0 )
{
DOMAttr* attr = doc.createAttribute(XS("name"));
attr->setValue( this->_sub_phase );
body->setAttributeNode(attr);
}
if( this->_phase.length() > 0 )
{
body->appendChild(doc.createTextNode(this->_phase));
}
return body;
}
示例6: toXML
/* NOTE: need to keep _type field in consideration as attribute type/entitlement depends on it.*/
DOMElement* EppMarkHolder::toXML(DOMDocument &doc, const DOMString &tag)
{
DOMString attr_name = "type";
DOMElement* elm;
DOMElement* body = doc.createElement(tag);
if( this->_type == EPPMARK_HOLDER )
{
attr_name = "entitlement";
}
DOMAttr* attr = doc.createAttribute(attr_name);
attr->setValue( this->_addParam );
body->setAttributeNode(attr);
if( this->_name.length() > 0 )
{
elm = doc.createElement(XS("name"));
elm->appendChild(doc.createTextNode(this->_name));
body->appendChild(elm);
}
if( this->_org.length() > 0 )
{
elm = doc.createElement(XS("org"));
elm->appendChild(doc.createTextNode(this->_org));
body->appendChild(elm);
}
body->appendChild(this->_addr.toXML(doc, "addr"));
if( this->_voice.getNumber().length() > 0 )
{
elm = this->_voice.toXML(doc, "voice");
body->appendChild(elm);
}
if( this->_fax.getNumber().length() > 0 )
{
elm = this->_fax.toXML(doc, "fax");
body->appendChild(elm);
}
if( this->_email.length() > 0 )
{
elm = doc.createElement(XS("email"));
elm->appendChild(doc.createTextNode(this->_email));
body->appendChild(elm);
}
return body;
}
示例7: namespaceEvent
void XercesSequenceBuilder::namespaceEvent(const XMLCh *prefix, const XMLCh *uri)
{
if(currentParent_ != 0) {
DOMAttr *attr = document_->createAttributeNS(XMLUni::fgXMLNSURIName, prefix == 0 ? XMLUni::fgXMLNSString : prefix);
if(prefix != 0) attr->setPrefix(XMLUni::fgXMLNSString);
attr->setValue(uri);
currentParent_->getAttributes()->setNamedItemNS(attr);
currentNode_ = attr;
} else {
document_ = new (context_->getMemoryManager()) XPathDocumentImpl(XQillaImplementation::getDOMImplementationImpl(), context_->getMemoryManager());
DOMXPathNamespace *ns = new (document_, (DOMDocumentImpl::NodeObjectType)XPathNamespaceImpl::XPATH_NAMESPACE_OBJECT)
XPathNamespaceImpl(prefix, uri, 0, document_);
seq_.addItem(new XercesNodeImpl(ns, (XercesURIResolver*)context_->getDefaultURIResolver()));
document_ = 0;
currentNode_ = 0;
}
}
示例8: attributeEvent
void XercesSequenceBuilder::attributeEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *value,
const XMLCh *typeURI, const XMLCh *typeName)
{
if(document_ == 0) {
document_ = new (context_->getMemoryManager()) XPathDocumentImpl(XQillaImplementation::getDOMImplementationImpl(), context_->getMemoryManager());
}
DOMAttr *attr = document_->createAttributeNS(uri, localname);
if(prefix != 0)
attr->setPrefix(prefix);
attr->setValue(value);
setAttributeTypeInfo(attr, typeURI, typeName);
if(currentParent_ != 0)
currentParent_->getAttributes()->setNamedItemNS(attr);
currentNode_ = attr;
if(currentParent_ == 0) {
seq_.addItem(new XercesNodeImpl(currentNode_, (XercesURIResolver*)context_->getDefaultURIResolver()));
document_ = 0;
currentNode_ = 0;
}
}