All Questions
Tagged with annotations xml
227 questions
0
votes
0
answers
28
views
Is it possible to serialize a class into XML without requiring the creation of a wrapper class that only holds complex types?
New-ish to C#.
Say I have the following XML (this is just an example.. ignore design choices)
<body>
<mywrapper>
<frontendinfo>
<version> 2 ...
0
votes
1
answer
144
views
org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions @XmlValue
org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions. Si une classe comporte la propriété @XmlElement, elle ne peut pas comporter la propriété @...
-1
votes
1
answer
88
views
How to use annotations to control the size (number of entries) of a Java Map
I need to be able to use annotations to control the size (number of entries) of a Java Map.
The following works for a Java List, but not for a Map:
@XmlElement
@Size(max = 2)
public List&...
1
vote
0
answers
18
views
Can't set constant property in xml
In my java 8 project:
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.*;
@XmlAccessorType(XmlAccessType.FIELD)
public class Network {
@...
0
votes
1
answer
128
views
Extract part of XML files in a folder
I have a folder with a number of Pascal Voc XML annotations of images. The annotations looks like the one in below
<annotation>
<folder>images</folder>
<filename>...
0
votes
1
answer
128
views
How to convert txt.knowtator.xml file to .ann?
I have an annotated dataset in txt.knowtator.xml format
<?xml version="1.0" encoding="UTF-8"?>
<annotations textSource="file.txt">
<annotation>
...
0
votes
1
answer
246
views
Java - How to set propOrder attribute dynamically within @XmlType
I have a class with xml annotations that will be instantiated then used to generated a xml file.
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"foo", &...
0
votes
1
answer
100
views
XSD 1.1: Limit number of overall attributes for an element
I am working on a card-game which is supposed to display a number of states and change them depending on conditions. To realise this, I have an element <properties> that is given to each card as ...
0
votes
1
answer
190
views
How loose coupling is achieved in Annotation based approach
How loose coupling is achieved in annotation based approaches? Because if I want to make any changes in the bean, I have to make the changes in corresponding java class. So how can I say it is loosely ...
0
votes
1
answer
434
views
JAXB Define XML elements with dots
I need to create a XML which matches this structure:
<OfferPackage Name="aaa">
<OfferPackage.Offers>
<OfferCollection Capacity="1">
<...
0
votes
1
answer
726
views
Ignite Cache Setup via XML and Annotation
I followed the example in the Ignite documentation for how to configure Ignite to act as a cache with a Postgres database.
I have been able to implement the person example and have had success ...
0
votes
1
answer
454
views
JAXB ignores @XmlAttribute annotation
It seems that JAXB ignores @XmlAttribute annotation and does not populate attributeName and attributeValue attributes.
Could you please help me to solve this problem?
XML:
<?xml version="1.0&...
0
votes
1
answer
492
views
Why I need mapping or annotation for Servlet, but not for JSP?
To make a request to Servlet, I need to use mapping inside XML file or add annotation for given Servlet. But why I am not required to do the same for JSP files as well? I will give examples.
How does ...
0
votes
1
answer
342
views
php Serializer XML remove tag
I try to create XML file. I use Serializer in annotations.
Products variable:
/**
* @var Product[]|ArrayCollection
* @Serializer\Type("ArrayCollection<Feed\Product>")
* @Serializer\...
1
vote
0
answers
86
views
Are there annotations in C# to iterate the names of array elements in the xml created by serialization?
I have an array with elements and want to have an iteration in the names of the elements when using Serialization in C#.
Let's say I have the class:
class MyClass {
public int[] MyArray { get; set;...