Hi
I've wrote the following helper method to create or replace an XML element
into an XML document (this may help others).
I notice that I must specify the default namespace into my XML element (elt
parameter below), otherwise when the element is inserted xmlbeans add a
default one with no value
Hi
I'm using XmlCursor.copyXml() to insert an element within a XML document.
The element is inserted at the right place but contains an empty namespace:
eg. display-name *xmlns=*Hola/display-name
What should I do in order to not have this empty namespace definition in the
result ?
Regards,
Could you play with something like this:
XmlOptions opts = new XmlOptions();
opts.setSavePrettyPrint();
final MapString,String suggestedNamespaces = new
HashMapString,String();
suggestedNamespaces.put(
http://schemas.xmlsoap.org/ws/2002/12/secext;, );
*To:* user@xmlbeans.apache.org
*Subject:* RE: Schema compilation into XMLBeans classes - issue with
several xs:anyType children
No, this is exactly what I had in mind :-)
Radu
--
*From:* Pascal Maugeri [mailto:[EMAIL PROTECTED]
*Sent:* Monday, May 19, 2008 3:28 AM
the content or you need to build the content from scratch,
respectively).
Radu
--
*From:* Pascal Maugeri [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, May 15, 2008 5:15 AM
*To:* user@xmlbeans.apache.org
*Subject:* Schema compilation into XMLBeans classes - issue
Hi
This email is related to the compilation of XMLBeans classes corresponding
to the XML schema urn:ietf:params:xml:ns:common-policy as defined in RFC
4745, section 13. I give the reference to this specific schema to illustrate
but of course the issue should apply in other situation as well.
In
you have elementFormDefault=qualified. So this
means your doc fragment has to look like:
String xml = ns:element uri=\www.apache.org\ xmlns:ns=
\http://www.example.org/docelement\http://www.example.org/docelement%5C
/;
Radu
On Wed, 2008-04-30 at 15:07 +0200, Pascal Maugeri wrote:
Hi Radu
constraints that force you to
parse from Element level?
HTH
Jim
On Mon, Apr 28, 2008 at 6:17 AM, Pascal Maugeri
[EMAIL PROTECTED] wrote:
Radu
You're right in the example below the element is not a
global schema type.
So what should I do if a server (XCAP server) sends
Hi
I do not manage to obtain the same results described in the XmlCursor
javadoc (
http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlCursor.html)
when analyzing the sample XML file.
According to the javadoc I should get:
sample x='y'
valuefoo/value
/sample
STARTDOC
On Thu, 2008-04-03 at 21:09 +0200, Pascal Maugeri wrote:
Hi
I do not manage to obtain the same results described in the XmlCursor
javadoc
(
http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlCursor.html)
when analyzing the sample XML file.
According to the javadoc I
Hi
I have the following document:
a
b
c/
/b
/a
When I move my XmlCursor to b child (in this case c/) and add a new
child d/ with cursor.beginElement() I get a the correct result:
a
b
d/
c/
/b
/a
But now if the original document is (no child under b/ yet):
a
b/
/a
How
is that the path must follow the structure of the
document. If elements/attributes are namespace-qualified in the
document,
then they must be too in the path. - Wing Yew
From: Pascal Maugeri [mailto:[EMAIL PROTECTED]
Sent: Friday, February 22, 2008 8:40
'mynamespace; /a/b.
The bottom line is that the path must follow the structure of the
document. If elements/attributes are namespace-qualified in the document,
then they must be too in the path.
- Wing Yew
--
*From:* Pascal Maugeri [mailto:[EMAIL PROTECTED]
*Sent:* Friday
distribution.
This already applies to XMLBeans 2.2 and the version of Saxon (8.6.1)
supported by it.
This information appears on the XMLBeans home page too.
- Wing Yew
--
*From:* Pascal Maugeri [mailto:[EMAIL PROTECTED]
*Sent:* Thursday, February 14, 2008 2:58 AM
Hi
I would like to have some clarifications on how to apply XPath query on a
XML document depending if it comes with or without a namespace definition.
When I run the following code executing the XPath query /a/b on a document
with no namespace:
String doc = ab//a;
String query
for your help
Pascal
On Feb 10, 2008 8:27 PM, Jacob Danner [EMAIL PROTECTED] wrote:
Take a peek at
http://xmlbeans.apache.org/samples/XQueryXPath.html
-jacobd
On Feb 10, 2008 7:56 AM, Pascal Maugeri [EMAIL PROTECTED] wrote:
Hi
I need to do this simple operation: having a XML
Hi
I need to do this simple operation: having a XML document (as a String for
instance) I want to apply to it an XPath query and to get the XML fragment
result in a new String.
Could you give me some source code sample or a link ?
Thanks in advance
Pascal
17 matches
Mail list logo