Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何找出可以为 XmlSerializer 设置的属性?
特别是,我想设置换行符和缩进。我找到了一个帖子,给出了一个例子,但它导致了一个不受支持的属性异常。
在 Android 中使用 XmlSerializer 时,您应该使用此获取换行符和缩进:
xmlSerializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true);