Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Ruby/Rails散列到XML:what';没有值的XML路径的键是什么?_Ruby On Rails_Xml - Fatal编程技术网

Ruby on rails Ruby/Rails散列到XML:what';没有值的XML路径的键是什么?

Ruby on rails Ruby/Rails散列到XML:what';没有值的XML路径的键是什么?,ruby-on-rails,xml,Ruby On Rails,Xml,我必须使XML遵循以下格式: <Address> <AddressLine1>ADDRESS LINE</AddressLine1> <City>CITY</City> <StateProvinceCode>XX</StateProvinceCode> <CountryCode>YY</CountryCode>

我必须使XML遵循以下格式:

    <Address>
        <AddressLine1>ADDRESS LINE</AddressLine1> 
        <City>CITY</City> 
        <StateProvinceCode>XX</StateProvinceCode> 
        <CountryCode>YY</CountryCode> 
        <PostalCode>00000</PostalCode> 
        <ResidentialAddress /> #<-- what do I do for this one?
    </Address>

地址线
城市
XX
YY
00000
# XML将
定义为与
相同。两者都定义得很好,内容为“null”(在您的语言中),而不是
'
,一个空字符串