On 11/01/2013, FrankVhh <frank.vanhoenshoven(a)agserv.eu> wrote:
With Wolfgang's approach, your patterns looking like:
XmlElement(name="SomeClass",value="foo",attribute["myAttr"]
== bar)
Would turn into:
SomeClass(value == "foo", myAttr == "bar")
Not quite. A DOM tree would be represented by a very small object
hierarchy according to the XML node typology:
node-element-attribute-text, etc. What I proposed in my IntelliFest
2012 paper is the addition of facts representing the DOM *structure*
to Pojos unmarshalled from the DOM tree.
Without having any numbers, we can still safely say that the performance
improvement that you should get from using the pojo's, especially with
"big"
files, should be somewhere in between "quite considerable" and
"huge".
It may reduce the number of facts by an order of magnitude, depends on
the XML tree's fan out, with consequences for insert, etc. There may
also be a penalty due to remaining at the level of "all is String"
(depends on the data).
-W
Out of curiosity:
A) Do you also call Modify or Update in your THEN clause?
B) What does this DSL phrase resolve to?
An XML element exists
- named someName with a value of
- at path /some/xpathlike/path with a value in
"someVal","someOtherVal"
Regards,
Frank
--
View this message in context:
http://drools.46999.n3.nabble.com/Solution-for-reasoning-over-XML-tp40214...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users