FasterXML / FasterXML/jackson-dataformat-xml

Write namespace declaration on root element only?

Offen
#670 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
631
Forks
246
Ø Merge
7 T. 9 Std.
Gemergte PRs (30 T.)
13

Beschreibung

Hello and thank you for such an awesome project!

I'm using dataformat-xml to create a video manifest (MPEG-DASH mpd), and for aesthetic reasons I'd really like if it could write all namespace declarations on the root element.

The XML I generate currently looks like this:
```xml


https://example.com/license

```

but I want to move the "xmlns:dashif="https://dashif.org/guidelines/clearKey"" to . Like this:

```xml


https://example.com/license

```

Is it possible to configure / override something in XmlMapper or Woodstox to make this work?

Thanks a lot,
Anton

Java 21 with `com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.2`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.