mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-02-20 21:29:13 +00:00
Added hack to inject namespace into blockly XML because Stupid java introduced a stupid breaking change to their stupid XML parsing logic for no valid reason. Just all stupid. Also I'm grumpy about this. HEY JAVA DEVS: NO BREAKING CHANGES DURING POINT RELEASES!
This commit is contained in:
parent
c13befd414
commit
12e7407b5a
@ -13,15 +13,14 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
@ -109,7 +108,8 @@ public class MythosEditor {
|
||||
|
||||
public void applyChanges() {
|
||||
try {
|
||||
String xml = controller.getScriptXml();
|
||||
String xml = controller.getScriptXml()
|
||||
.replaceFirst(Pattern.quote("<block"), "<block xmlns=\"outlaw\"");
|
||||
JAXBContext context = JAXBContext.newInstance("org.badvision.outlaweditor.data.xml");
|
||||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
|
Loading…
x
Reference in New Issue
Block a user