#14891 closed bug (notabug)
$.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 $.parseXML
fails 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 scriptTask
the parsing works again.
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Did you actually LOOK at the input to .parseHTML
, or the console? Please ask for help on a forum.
comment:3 Changed 9 years ago by
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.