We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d2d0e3 commit 2c026ebCopy full SHA for 2c026eb
1 file changed
XMLTest.java
@@ -311,7 +311,13 @@ public void shouldHandleIllegalJSONNodeNames()
311
312
String result = XML.toString(inputJSON);
313
314
- String expected = "<___IllegalNode>someValue1</___IllegalNode><Illegal_node>someValue3</Illegal_node>";
+ /**
315
+ * This is invalid XML. Names should not begin with digits or contain
316
+ * certain values, including '@'. One possible solution is to replace
317
+ * illegal chars with '_', in which case the expected output would be:
318
+ * <___IllegalNode>someValue1</___IllegalNode><Illegal_node>someValue2</Illegal_node>
319
+ */
320
+ String expected = "<123IllegalNode>someValue1</123IllegalNode><Illegal@node>someValue2</Illegal@node>";
321
322
assertEquals(expected, result);
323
}
0 commit comments