Open
Description
Hello,
I have the following class definition with embedded decorators:
@XMLElement({
root: "ContentFile"
})
export class ContentFile {
@XMLChild({
name: ""
})
private _path: string;
@XMLAttribute({
name: "Numpages"
})
private _numPages: number;
...
}
After serialisation I need a XML structure like this:
<ContentFile NumPages="1">this is the value stored in private property _path</ContentFile>
Unfortunately I can't figure out how to do this because as soon as I declare _path as a XMLChild I get a sub-Element:
<ContentFile NumPages="1">
<_path>this is the value stored in private property _path</_path>
</ContentFile>
I miss something like a @XMLText decorator which allows me to serialize a class property into a XML text node.
Or is it possible to achieve this with existing means?
Best,
Robert
Metadata
Metadata
Assignees
Labels
No labels