Side navigation
#14891 closed bug (notabug)
Opened March 14, 2014 11:13AM UTC
Closed March 14, 2014 12:22PM UTC
Last modified March 14, 2014 01:00PM UTC
$.parseXML exception on nested script tag
| Reported by: | akoskm | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.10.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
The following XML is valid according to http://validator.w3.org/:
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
xmlns:tns="http://www.jboss.org/drools">
<process processType="Private"
isExecutable="true"
id="com.sample.bpmn"
name="Sample Process"
tns:packageName="defaultPackage" >
<scriptTask id="_2" name="Sample Script" scriptFormat="http://www.java.com/java">
<script>person.id</script>
</scriptTask>
</process>
</definitions>
however
$.parseXMLfails to parse it and throws the following exception:
Uncaught Error: Invalid XML: <?xml version="1.0" encoding="UTF-8"?>
<definitions id="Definition"
xmlns:tns="http://www.jboss.org/drools">
<process processType="Private"
isExecutable="true"
id="com.sample.bpmn"
...<omitted>...id
If I remove the child
<script></script>inside
scriptTaskthe parsing works again.
Attachments (0)
Change History (3)
Changed March 14, 2014 11:19AM UTC by comment:1
Changed March 14, 2014 12:22PM UTC by comment:2
| resolution: | → notabug |
|---|---|
| status: | new → closed |
Did you actually LOOK at the input to .parseHTML, or the console? Please ask for help on a forum.
Changed March 14, 2014 01:00PM UTC by comment:3
Thank you for looking into this.
I haven't look at
.parseHTML. It makes a slight different, indeed. Instead of throwing an exception it silently fails and returns an incomplete XML docum.
I really hope that I'm missing something at this is the intended behavior of parseXML and parseHTML.
Please take a look at this fiddle and the console output: http://jsfiddle.net/k7m6w/
JSFiddle demonstrating the error.