Question: So NSXMLParser has problems parsing strings using the Windows-1252 encoder. Now I did find a solution on this page to convert it to NSUTF8StringEncoding. But now it bumps into characters it can't parse.

So I figured out that it will work if I would escape special characters and then transfer it back after parsing it. For example:

```
string = [string stringByReplacingOccurrencesOfString:@":" withString:@"__58__"];

```

Since it is allowed to use the \_ character without getting a parser error and in NSXMLParser I can transfer the value back to it's proper character.

So is there a way I can loop through all ASCII character so I can replace all special characters (Except <, > and \_ of course)?

Answer: 
Set inverse to false for <map> element.
I try search in google but there is no information about difference between `<map><one-to-many >` and `<map><composite-element>` so I use `<map><one-to-many >`.  

`<map name="Urls" table="UserUrl" lazy="true" cascade="all-delete-orphans">
 <key column="user_id"/>
 <index column="url_type_id" type="Int32"/>
 <composite-element>
 <property name="UrlType" column="url_type_id" type="Int32" not-null="true"/>
 <property name="Url" column="url" type="String" not-null="true"/>
 </composite-element>
 </map>`

---

If the Url is not an independent entity, having an own Id, then you could map it  
as composite-element. The url is treated as a value type.  
There is no class UserUrl mapping anymore.
I use UserUrl class in other code