Silvain>If it were possible to use the XML syntax in Java, then I would
have the best of two worlds! It would be great if we could write
code like:
myElement.addXml("<node1 name='hello'><node2/></node1>");
The xml code would be parsed, and added as child elements to myElement.
Is this already possible? Would it be difficult to implement?
Me>Can I vote on this or do I have to be on the developer's list? If I can
I vote NO, if I can't let me know so I can join the developers list.
The functionality mentioned is something Silvain can build as his own layer
above dom4j. Its not that hard to implement. Off the top of my head; for
each XML string fragment create a dom4j object via SAX -> get access to the
root node -> detach it from the current dom -> append it to its new parent.
The solution is certainly not very efficient but can work (ignoring
potential namespace issues of course).
Dane Foster
Equity Technology Group, Inc
http://www.equitytg.com.
954.360.9800
----- Original Message -----
From: "Silvain Piree" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 12:39 PM
Subject: [dom4j-user] adding XML in Java
Hi,
I switched from XSL to DOM4J/Java because the XSL scripts were
becoming too complex. It's a lot easier to build the transformation logic
in Java!
But .... now I have another problem: I have to write a lot of
addElement/addAttribute calls to build XML nodes, whereas
in XSL I could use XML syntax.
If it were possible to use the XML syntax in Java, then I would
have the best of two worlds! It would be great if we could write
code like:
myElement.addXml("<node1 name='hello'><node2/></node1>");
The xml code would be parsed, and added as child elements to myElement.
Is this already possible? Would it be difficult to implement?
Silvain
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user