Hi Folks,

As I understand it, extraEscapedCharacters identifies characters that are to be 
escaped during unparsing. They are characters to be escaped above and beyond 
the characters identified by the escapeCharacter property.

Below I created an example to illustrate the use of extraEscapedCharacters. Is 
it correct? The example is hokey, do you have a more compelling example? 

Example: Suppose a data format contains a sequence of data items separated by 
forward slash. If a data item contains a separator, the separator is escaped by 
a backslash. An instance contains these three data items: "Yellow", "Lemon 
and/or Banana", and "6". The forward slash in the second data item needs 
escaping. Here is the instance:

Yellow/Lemon and\/or Banana/6

Parsing the instance produces this XML:

<FruitBasket>
    <Color>Yellow</Color>
    <Fruits>Lemon and/or Banana</Fruits>
    <Quantity>6</Quantity>
</FruitBasket>

If extraEscapedCharacters="" (no additional characters to be escaped during 
unparsing), then unparsing produces:

Yellow/Lemon and\/or Banana/6

If extraEscapedCharacters="a e", then the unparser will also escape all a's and 
e's, to produce:

Y\ellow/L\emon \and\/or B\an\an\a/6

Is that correct?

/Roger

Reply via email to