Laurent PETIT wrote:
Hello,
2008/9/24 Dennis Sosnoski [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
The reason the line number sometimes appears off is because it
uses the
current line when the object is created. ...
My example did not have start tags spanning multiple lines.
Hello,
2008/9/24 Dennis Sosnoski [EMAIL PROTECTED]
The reason the line number sometimes appears off is because it uses the
current line when the object is created. Usually the object is created
by unmarshalling a start tag, and because the parser scans the whole
start tag (attributes and
Precision, it seems that the line and column information is obtained at
unmarshalling time, and added as a derived property of each object.
2008/9/23 Laurent PETIT [EMAIL PROTECTED]
Hello,
Another thing that is currently done on my project that uses JAXB is that
at marshalling time, a custom
Yeah, just add track-source to your binding declarations:
binding direction=input track-source=true
...
Then (after parsing) you can cast any of your bound objects to
ITrackSource and retrieve document source information:
ITrackSource tracker = ( ITrackSource ) boundObject;
System.out.println(
Wow, it's great !
I have it worked in minutes ! Thanks !
But, one more question please : how does the line count work ? It seems to
me that while the real line number is 7 (counting from 1), with ITrackSource
I get is 8.
Is there a logic explanation to this ?
Thanks in advance,
--
Laurent
The reason the line number sometimes appears off is because it uses the
current line when the object is created. Usually the object is created
by unmarshalling a start tag, and because the parser scans the whole
start tag (attributes and all) at once you'll get the line number for
the end of
Ok, so a little reading of the documentation solved this. There is a
style=cdata that I had not seen before. Changing my element to this style
resolved my problem.
-
Hi all,
Can anyone tell me how I can add a CData using Jibx
For example
...
Description![CData[Some Test with Special
This is my class:
public class Message {
private Integer messageId;
...
}
And this is the xml I need to produce.
ns1:message
ns1:id ns2:default=11/ns1:id
/ns1:message
I need to add some extra (constant) attributes of a different
namespace (ns2:default) to the value of message
(Sorry - previous message had incomplete subject)
This is my class:
public class Message {
private Integer messageId;
...
}
And this is the xml I need to produce.
ns1:message
ns1:id ns2:default=11/ns1:id
/ns1:message
I need to add some extra (constant) attributes of a different
On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote:
(Sorry - previous message had incomplete subject)
This is my class:
public class Message {
private Integer messageId;
...
}
And this is the xml I need to produce.
ns1:message
ns1:id ns2:default=11/ns1:id
/ns1:message
On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote:
On 9/1/06, Kees de Kooter [EMAIL PROTECTED] wrote:
(Sorry - previous message had incomplete subject)
This is my class:
public class Message {
private Integer messageId;
...
}
And this is the xml I need to produce.
Hi John,
It sounds like you should be able to just define two separate bindings,
and select the appropriate binding at runtime. You can separate portions
of the binding you want to have in common into a third binding file, and
use include to incorporate the shared bindings into each of the
12 matches
Mail list logo