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;
}
DOMElement* EppCommandInfoSvcsub::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* elm;
	DOMElement* body = EppUtil::createElementNS(doc, "svcsub", tag);

	if( id.isNotNull() )
	{
		elm = doc.createElement(XS("id"));
		elm->appendChild(doc.createTextNode(id));
		body->appendChild(elm);
	}
	if( service.isNotNull() )
	{
		elm = doc.createElement(XS("service"));
		elm->appendChild(doc.createTextNode(service));
		body->appendChild(elm);
	}
	if( userid.isNotNull() )
	{
		elm = doc.createElement(XS("userid"));
		elm->appendChild(doc.createTextNode(userid));
		body->appendChild(elm);
	}
	if( authInfo != null )
	{
		body->appendChild(authInfo->toXML(doc, "authInfo"));
	}

	return toXMLCommon(doc, tag, *body);
}
DOMElement* EppResponseDataRenewDomain::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* elm;
	DOMElement* body = doc.createElement(tag);
	DOMElement* data = EppUtil::createElementNS(doc, "domain", "renData");
	body->appendChild(data);

	if( name.isNotNull() )
	{
		elm = doc.createElement(XS("name"));
		elm->appendChild(doc.createTextNode(name));
		data->appendChild(elm);
	}
	if( roid.isNotNull() )
	{
		elm = doc.createElement(XS("roid"));
		elm->appendChild(doc.createTextNode(roid));
		data->appendChild(elm);
	}
	if( exDate != 0 )
	{
		elm = doc.createElement(XS("exDate"));
		elm->appendChild(EppUtil::createTextNode(doc, exDate));
		data->appendChild(elm);
	}

	return body;
}
Exemplo n.º 4
0
EppAuthInfo * EppAuthInfo::fromXML( const DOMNode& root )
{
	DOMNodeList* list = root.getChildNodes();
	for( unsigned int i = 0; i < list->getLength(); i++ )
	{
		DOMNode* node = list->item(i);
		DOMString name = node->getLocalName();
		if( name.isNull() )
		{
			name = node->getNodeName();
		}
		if( name.isNull() )
		{
			continue;
		}
//		if( name.equals("pw") )
		if( name.equals("pw") || name.equals("contact:pw") || name.equals("domain:pw") || name.equals("svcsub:pw")
			|| name.equals("xriAU:pw") || name.equals("xriINU:pw") || name.equals("xriINA:pw") || name.equals("xriISV:pw") /* Uncomment for CodeString || name.equals("xriCS:pw")*/ )
		{
			DOMElement * elm = (DOMElement *) node;
			DOMString roid = elm->getAttribute(XS("roid"));
			DOMString value = EppUtil::getText(*node);
			return new EppAuthInfo(XS(TYPE_PW), value, roid);
		}
//		else if( name.equals("ext") )
		else if( name.equals("ext") || name.equals("contact:ext") || name.equals("domain:ext") || name.equals("svcsub:ext")
			|| name.equals("xriAU:ext") || name.equals("xriINU:ext") || name.equals("xriINA:ext") || name.equals("xriISV:ext") )
		{
			return new EppAuthInfo(XS(TYPE_EXT), NULLXS);
		}
	}
	return null;
}
DOMElement* EppLaunchProtection::toXML(DOMDocument &doc, const DOMString &tag)
{
	DOMElement* elm;
	DOMElement* body = doc.createElement(tag);

	if( this->_cc.length() >0 )
	{
		elm = doc.createElement(XS("cc"));
		elm->appendChild(doc.createTextNode(this->_cc));
		body->appendChild(elm);
	}
	if( this->_region.length() > 0 )
	{
		elm = doc.createElement(XS("region"));
		elm->appendChild(doc.createTextNode(this->_region));
		body->appendChild(elm);
	}
	if( this->_ruling.length() > 0 )
	{
		elm = doc.createElement(XS("ruling"));
		elm->appendChild(doc.createTextNode(this->_ruling));
		body->appendChild(elm);
	}

	return body;
}
DOMElement* EppCommandCreateSecDns::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* elm;
	DOMElement* body = EppUtil::createElementNS(doc, "secDNS", (tag.isNull()) ? "create" : tag, false, "-1.1");

	if( this->maxSigLife != -1 )
	{
		elm = doc.createElement(XS("maxSigLife"));
		char cBuffer[32];
		sprintf(cBuffer, "%d", this->maxSigLife);
		elm->appendChild(doc.createTextNode(XS(cBuffer)));
		body->appendChild(elm);
	}
	for( unsigned int i = 0; i < this->dsDataList->size(); i++ )
	{
		EppSecDnsDsData ds = dsDataList->elementAt(i);
		DOMElement* elm = ds.toXML(doc, "dsData");
		body->appendChild(elm);
	}
	if( this->keyDataPresent == true )
	{
		for( unsigned int i = 0; i < this->keyDataList->size(); i++ )
		{
			EppSecDnsKeyData kd = keyDataList->elementAt(i);
			DOMElement* elm = kd.toXML(doc, "keyData");
			body->appendChild(elm);
		}
	}
	return body;
}
DOMElement* EppTransactionId::toXML( DOMDocument& doc, const DOMString& tag, bool nsflag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;

	if( clTRID.isNotNull() )
	{
		if( nsflag == true )
		{
			elm = EppUtil::createElementNS(doc, "epp", "clTRID", false);
		}
		else
		{
			elm = doc.createElement(XS("clTRID"));
		}
		elm->appendChild(doc.createTextNode(clTRID));
		body->appendChild(elm);
	}
	if( svTRID.isNotNull() )
	{
		if( nsflag == true )
		{
			elm = EppUtil::createElementNS(doc, "epp", "svTRID", false);
		}
		else
		{
			elm = doc.createElement(XS("svTRID"));
		}
		elm->appendChild(doc.createTextNode(svTRID));
		body->appendChild(elm);
	}
	return body;
}
Exemplo n.º 8
0
DOMElement* EppCreds::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;

	if( clID.isNotNull() )
	{
		elm = doc.createElement(XS("clID"));
		elm->appendChild(doc.createTextNode(clID));
		body->appendChild(elm);
	}
	if( pw.isNotNull() )
	{
		elm = doc.createElement(XS("pw"));
		elm->appendChild(doc.createTextNode(pw));
		body->appendChild(elm);
	}
	if( newPW.isNotNull() )
	{
		elm = doc.createElement(XS("newPW"));
		elm->appendChild(doc.createTextNode(newPW));
		body->appendChild(elm);
	}
	if( options != null )
	{
		body->appendChild(options->toXML(doc, "options"));
	}

	return body;
}
Exemplo n.º 9
0
DOMElement* EppAuthInfo::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;
	if( (type.isNotNull()) && type.equals(TYPE_PW) )
	{
		elm = doc.createElement(XS("pw"));
		body->appendChild(elm);
		if( roid.isNotNull() && roid.length() > 0 )
		{
			elm->setAttribute(XS("roid"), roid);
		}
		if( value.isNotNull() )
		{
			elm->appendChild(doc.createTextNode(value));
		}
	}
	else if( (type.isNotNull()) && type.equals(TYPE_EXT) )
	{
		elm = doc.createElement(XS("ext"));
		body->appendChild(elm);
	}

	return body;
}
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;
}
Exemplo n.º 11
0
A getSymKstack(void)
{
  I n=K-MY;I *zp,i,s;
  C **ns=get_primlist(1,1);
  A z=gv(Et,n);zp=z->p;
  i=1;
  while(i<=n)
  {
    s=MY[i++];
    if(0==s){*zp++=(I)aplus_nl;}
    else if(s>-9999&&s<6)
    {
      if(0>s)*zp++=(I)gi(-s);
      else *zp++=(I)gvi(Et,1,MS(si(ns[s])));
    }
    else if(QV(s)) 
    {
      *zp++=(I)gvi(Et,2,gsv(0,"file"),gsv(0,(C *)(s&~aplusMask)));
      *zp++=(I)gi(-MY[i++]);
    } 
    else if(QS(s))
    {
      *zp++=(I)gvi(Et,2,gsv(0,"expr"),gsv(0,(C *)(s&~aplusMask)));
    }
    else
    {
      A f=(A)s;
      sprintf((C *)ks_buf,"%s.%s",((CX)f->p[f->n+2])->s->n,XS(*f->d)->n);
      *zp++=(I)gvi(Et,2,gsv(0,"func"),gsv(0,(C *)ks_buf));
    }
  }
  R z;
}
Exemplo n.º 12
0
unsigned long EnumTables::alignFormat(A sym_)   /* This originated from AXAlign::format */
{
  unsigned long align=0;
  if (sym_!=0)
   {
     A *p=(A *)sym_->p;
     for (int i=0; i<(int)sym_->n; i++)
      {
	char *s=(char *)XS(sym_->p[i])->n;
	if (QS(p[i]))
	{
	  unsigned long val = (unsigned long)alignEnumHashTable()->lookup(s);
	  if (val==alignEnumHashTable()->notFound())
	   {
	     cerr << "ã ! ";
	     if (s!=0) cerr<<s;
	     cerr<<": invalid alignment symbol"<<endl;
	   }
	  else
	    {
	      align |= val;
	    }
	}
      }
   }
  if ((align&MSLeft)&&(align&MSRight)) align-=MSRight;
  if ((align&MSTop)&&(align&MSBottom)) align-=MSBottom;
  return align;
}
Exemplo n.º 13
0
DOMText* EppUtil::createTextNode( DOMDocument& doc, const time_t cal, bool dateOnly )
{
	char buf[128];
	struct tm tmp;

#if	   EPP_SUPPORT_UNSIGNED_TIME_T		/* { */

	long long t = (long long) ((unsigned int) cal);
	(void) gmtime64_r(&t, &tmp);

#else	/* EPP_SUPPORT_UNSIGNED_TIME_T	*/	/* } */

#if       defined(win32)      /* { */
	struct tm * p = gmtime(&cal);
	tmp = *p;
#else  /* defined(win32) */   /* } { */
	(void) gmtime_r(&cal, &tmp);
#endif /* defined(win32) */   /* } */

#endif	/* EPP_SUPPORT_UNSIGNED_TIME_T	*/	/* } */

	const char * fmt = dateOnly ? "%Y-%m-%d" : "%Y-%m-%dT%H:%M:%S.0Z";
	buf[0] = '\0';
	(void) strftime(buf, sizeof(buf), fmt, &tmp);

	return doc.createTextNode(XS(buf));
}
void EppResponseInfoFeeType::toXMLCommon( DOMDocument &doc, const DOMString &tag, DOMElement& inElement )
{
	EppCommandInfoFeeType::toXMLCommon(doc, tag, inElement);
	DOMElement* elm = NULL;

	if( NULL != this->fee )
	{
		for( unsigned int i = 0; i < fee->size(); i++ )
		{
			EppFeeFee* member = fee->elementAt(i);

			if( NULL != member )
			{
				elm = member->toXML(doc, "fee");

				if( NULL != elm )
				{
					inElement.appendChild(elm);
				}
			}
		}
	}

	if( this->fClass.length() > 0 )
	{
		elm = doc.createElement(XS("class"));
		elm->appendChild(doc.createTextNode(this->fClass));
		inElement.appendChild(elm);
	}
}
EppCommandInfoLaunchRegistration* EppCommandInfoLaunchRegistration::fromXML( const DOMNode& root )
{
	EppCommandInfoLaunchRegistration* cmd  = new EppCommandInfoLaunchRegistration();
	if( cmd == null )
	{
		return null;
	}
	DOMNodeList* list      = root.getChildNodes();
	DOMNamedNodeMap* attrs = root.getAttributes();

	for( unsigned int i = 0; i < list->getLength(); i++ )
	{
		DOMNode* node  = list->item(i);
		DOMString name = node->getLocalName();
		if( name.isNull() )
		{
			name = node->getNodeName();
		}
		if( name.isNull() )
		{
			continue;
		}
		if( (name.length() > 7) && name.substringData(0, 7).equals("launch:") )
		{
			name = name.substringData(7, name.length() - 7);
		}
		if( name.equals("phase") )
		{
			EppLaunchPhase *_pptr = EppLaunchPhase::fromXML(*node);
			if( null != _pptr )
			{
				cmd->_phase = *_pptr;
				delete _pptr;
			}
			_pptr = null;
		}
		else if ( name.equals("applicationID") )
		{
			cmd->_appId = EppUtil::getText(*node);
		}
	}
	for( unsigned int i = 0;i<attrs->getLength();i++ )
	{
		DOMNode* attr = attrs->item(i);
		if( XS(attr->getNodeName()).equals("includeMark") )
		{
			DOMString _v = attr->getNodeValue();
			if( _v.length() > 0 )
			{
				if( _v.equals("true") )
				{
					cmd->includeMark(true);
				}
			}
			break;
		}
	}
	return cmd;
}
Exemplo n.º 16
0
/* 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;
}
Exemplo n.º 17
0
static C *getString(A aobj)
{
  C *z;
  if (Ct==aobj->t)z=(C *)aobj->p;
  else if (Et==aobj->t&&1==aobj->n&&QS(*aobj->p))z=XS(*aobj->p)->n;
  else z=(C *)0;
  return z;
}
Exemplo n.º 18
0
DOMElement* EppSecDnsKeyData::toXML( DOMDocument& doc, const DOMString& tag )
{
	char	    buf[32];
	DOMElement* elm;
	DOMElement* body = doc.createElement(tag);

	elm = doc.createElement(XS("flags"));
	(void) ::sprintf(buf, "%d", this->flags);
	elm->appendChild(doc.createTextNode(XS(buf)));
	body->appendChild(elm);

	elm = doc.createElement(XS("protocol"));
	(void) ::sprintf(buf, "%d", this->protocol);
	elm->appendChild(doc.createTextNode(XS(buf)));
	body->appendChild(elm);

	elm = doc.createElement(XS("alg"));
	(void) ::sprintf(buf, "%d", this->alg);
	elm->appendChild(doc.createTextNode(XS(buf)));
	body->appendChild(elm);

	if( this->public_key.isNotNull() )
	{
		elm = doc.createElement(XS("pubKey"));
		elm->appendChild(doc.createTextNode(this->public_key));
		body->appendChild(elm);
	}

	return body;
}
Exemplo n.º 19
0
/* Check for 'username', 'usernameusername' and 'emanresu' as passwds. */
static strat_1()				/* 0x61ca */
{
    int cnt;
    char usrname[50], buf[50];

    for (cnt = 0; x27f2c && cnt < 50; x27f2c = x27f2c->next) { /* 1740 */
	/* Every tenth time look for "me mates" */
	if ((cnt % 10) == 0)
	    other_sleep(0);
	/* Check for no passwd */
	if (try_passwd(x27f2c, XS("")))			/* other_fd+84 */
	    continue;			/* 1722 */
	/* If the passwd is something like "*" punt matching it. */
	if (strlen(x27f2c->passwd) != 13)
	    continue;
	strncpy(usrname, x27f2c, sizeof(usrname)-1);
	usrname[sizeof(usrname)-1] = '\0';
	if (try_passwd(x27f2c, usrname))
	    continue;
	sprintf(buf, XS("%.20s%.20s"), usrname, usrname);
	if (try_passwd(x27f2c, buf))
	    continue;				/* 1722 */
	sscanf(x27f2c->gecos, XS("%[^ ,]"), buf);
	if (isupper(buf[0]))
	    buf[0] = tolower(buf[0]);
	if (strlen(buf) > 3  && try_passwd(x27f2c, buf))
	    continue;
	buf[0] = '\0';
	sscanf(x27f2c->gecos, XS("%*s %[^ ,]s"), buf);
	if (isupper(buf[0]))
	    buf[0] = tolower(buf[0]);
	if (strlen(buf) > 3  && index(buf, ',') == NULL  &&
	    try_passwd(x27f2c, buf))
	    continue;
	reverse_str(usrname, buf);
	if (try_passwd(x27f2c, buf))
	    ;
    }
    if (x27f2c == 0)
	cmode = 2;
    return;
}
Exemplo n.º 20
0
DOMElement* EppCredsOptions::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;

	if( version.isNotNull() )
	{
		elm = doc.createElement(XS("version"));
		elm->appendChild(doc.createTextNode(version));
		body->appendChild(elm);
	}
	if( lang.isNotNull() )
	{
		elm = doc.createElement(XS("lang"));
		elm->appendChild(doc.createTextNode(lang));
		body->appendChild(elm);
	}

	return body;
}
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);
}
void EppCommandCheckFeeType::toXMLCommon( DOMDocument &doc, const DOMString &tag, DOMElement& inElement )
{
	DOMElement* elm = NULL;

	if( this->name.length() > 0 )
	{
		elm = doc.createElement(XS("name"));
		elm->appendChild(doc.createTextNode(this->name));
		inElement.appendChild(elm);
	}
	EppCommandInfoFeeType::toXMLCommon(doc, tag, inElement);
}
DOMElement* EppResponseDataCreateSvcsub::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* elm;
	DOMElement* body = doc.createElement(tag);
	DOMElement* data = EppUtil::createElementNS(doc, "svcsub", "creData");
	body->appendChild(data);

	if( id.isNotNull() )
	{
		elm = doc.createElement(XS("id"));
		elm->appendChild(doc.createTextNode(id));
		data->appendChild(elm);
	}
	//	if( roid.isNotNull() )
	//	{
	//		elm = doc.createElement(XS("roid"));
	//		elm->appendChild(doc.createTextNode(roid));
	//		data->appendChild(elm);
	//	}
	if( service.isNotNull() )
	{
		elm = doc.createElement(XS("service"));
		elm->appendChild(doc.createTextNode(service));
		data->appendChild(elm);
	}
	if( crDate != 0 )
	{
		elm = doc.createElement(XS("crDate"));
		elm->appendChild(EppUtil::createTextNode(doc, crDate));
		data->appendChild(elm);
	}
	if( exDate != 0 )
	{
		elm = doc.createElement(XS("exDate"));
		elm->appendChild(EppUtil::createTextNode(doc, exDate));
		data->appendChild(elm);
	}

	return body;
}
Exemplo n.º 24
0
DOMElement* EppAddress::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;

	for( int i = 0; i < MAX_NUM_OF_STREETS; i++ )
	{
		if( street[i].isNotNull() )
		{
			elm = doc.createElement(XS("street"));
			elm->appendChild(doc.createTextNode(street[i]));
			body->appendChild(elm);
		}
	}
	if( city.isNotNull() )
	{
		elm = doc.createElement(XS("city"));
		elm->appendChild(doc.createTextNode(city));
		body->appendChild(elm);
	}
	if( sp.isNotNull() )
	{
		elm = doc.createElement(XS("sp"));
		elm->appendChild(doc.createTextNode(sp));
		body->appendChild(elm);
	}
	if( pc.isNotNull() )
	{
		elm = doc.createElement(XS("pc"));
		elm->appendChild(doc.createTextNode(pc));
		body->appendChild(elm);
	}
	if( cc.isNotNull() )
	{
		elm = doc.createElement(XS("cc"));
		elm->appendChild(doc.createTextNode(cc));
		body->appendChild(elm);
	}
	return body;
}
DOMElement* EppResponseDataCreateLaunchRegistration::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body;
	body = EppUtil::createElementNS(doc, "launch", (tag.isNull()) ? XS("creData") : tag, false, "-1.0");
	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 )
		{
			DOMElement* elm = doc.createElement(XS("applicationID"));
			elm->appendChild(doc.createTextNode(this->_appId));
			body->appendChild(elm);
		}
	}

	return body;

}
Exemplo n.º 26
0
DOMElement* EppFeeCredit::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);

	if( this->description.length() > 0 )
	{
		body->setAttribute(XS("description"), this->description);
	}
	body->appendChild(doc.createTextNode(this->credit));

	return body;

}
Exemplo n.º 27
0
EppFeeCredit * EppFeeCredit::fromXML( const DOMNode& root )
{
	EppFeeCredit *data = new EppFeeCredit();

	data->setCredit(EppUtil::getText(root));

	DOMString desc = ( ( DOMElement* ) & root )->getAttribute(XS("description"));

	if( desc.length() > 0 )
	{
		data->setDescription(desc);
	}

	return data;
}
DOMElement* EppResponseDataTransferSvcsub::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* elm;
	DOMElement* body = doc.createElement(tag);
	DOMElement* data = EppUtil::createElementNS(doc, "svcsub", "trnData");
	body->appendChild(data);

	if( id.isNotNull() )
	{
		elm = doc.createElement(XS("id"));
		elm->appendChild(doc.createTextNode(id));
		data->appendChild(elm);
	}
	if( service.isNotNull() )
	{
		elm = doc.createElement(XS("xervice"));
		elm->appendChild(doc.createTextNode(service));
		data->appendChild(elm);
	}

	toXMLCommon(doc, *data);

	return body;
}
Exemplo n.º 29
0
DOMElement* EppContactData::toXML( DOMDocument& doc, const DOMString& tag )
{
	DOMElement* body = doc.createElement(tag);
	DOMElement* elm;

	if( name.isNotNull() )
	{
		elm = doc.createElement(XS("name"));
		elm->appendChild(doc.createTextNode(name));
		body->appendChild(elm);
	}
	if( (org.isNotNull()) || hasOrg )
	{
		elm = doc.createElement(XS("org"));
		elm->appendChild(doc.createTextNode(org));
		body->appendChild(elm);
	}
	if( !addr.isNull() )
	{
		body->appendChild(addr.toXML(doc, "addr"));
	}

	return body;
}
Exemplo n.º 30
0
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;
}