Closed
Description
Document xml = new Document(Parser.NamespaceXml, "https://example.com"); // no child nodes yet
xml.outputSettings().syntax(Syntax.xml);
xml.charset(StandardCharsets.UTF_8);
Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.base/java.util.Objects.checkIndex(Objects.java:361)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at org.jsoup.nodes.Document.ensureMetaCharsetElement(Document.java:366)
at org.jsoup.nodes.Document.charset(Document.java:274)
at suds.Feed.generateFeed(Feed.java:35)
at suds.Suds.processEverything(Suds.java:120)
... 1 more
Activity
Don't try to get child nodes if there aren't any yet