We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input XML
<resources> <string name="countdown"> <xliff:g id="count" example="2 days">%1$s</xliff:g> until holiday <xliff:g id="time" example="5 days">%1$s</xliff:g> anything </string> </resources>
Run convert({encoding: 'UTF-8', convert: {text: 'value'}}, input, {format: 'object'}) method
convert({encoding: 'UTF-8', convert: {text: 'value'}}, input, {format: 'object'})
Expected output
{ "resources": { "string": { "@name": "countdown", "value": [ { "xliff:g": { "@id": "count", "@example": "2 days", "value": "%1$s" } }, { "value": "\r\n until holiday\r\n " }, { "xliff:g": { "@id": "time", "@example": "5 days", "value": "%1$s" } }, { "value": "\r\n weew\r\n" } ] } } }
Output
{ "resources": { "string": { "value": [ { "@name": "countdown" }, { "xliff:g": { "@id": "count", "@example": "2 days", "value": "%1$s" } }, { "value": "\r\n until holiday\r\n " }, { "xliff:g": { "@id": "time", "@example": "5 days", "value": "%1$s" } }, { "value": "\r\n weew\r\n" } ] } } }
Attribute @name is included in array like child node, but this attribute must be located in object value.
@name
value
The text was updated successfully, but these errors were encountered:
2e4508b
oozcitak
No branches or pull requests
Input XML
Run
convert({encoding: 'UTF-8', convert: {text: 'value'}}, input, {format: 'object'})
methodExpected output
Output
Attribute
@name
is included in array like child node, but this attribute must be located in objectvalue
.The text was updated successfully, but these errors were encountered: