Comments (1)
I have a similar issue, given the JSON structure:
{
"bookId": "35972826-85ec-4877-99dd-32a9f14587ec",
"bookTitle": "The Vietnam War",
"parts": [
{
"partTitle": "The Genesis of Conflict",
"chapters": [
{
"chapterTitle": "Colonial Tensions and the Rise of Ho Chi Minh",
"sections": [
{
"sectionTitle": "The Seeds of Rebellion",
"paragraphs": [
{
"paragraphText": "EDITED CHAPTER CONTENT In exploring the spirit of early Vietnamese resistance against the French, one poignant anecdote revolves around the legendary Trung Sisters, Trung Trac, and Trung Nhi. In the first century AD, they embodied the fervent resistance against foreign domination. Facing the oppressive rule of the Chinese Han Dynasty, the Trung Sisters rallied their fellow Vietnamese in a daring revolt. Their leadership and courage inspired a formidable army that successfully expelled the Chinese forces, declaring a brief but significant period of Vietnamese independence."
},
{
"paragraphText": "The Trung Sisters' tale resonates as a powerful symbol of unwavering determination against external forces. Their commitment to liberating their homeland became a rallying cry for future generations of Vietnamese resisting foreign dominance. This early episode laid a foundation for the enduring spirit of resistance that continued to shape Vietnam's struggle against various colonizers, including the French in the subsequent centuries."
},
{
"paragraphText": "The Trung Sisters' legacy serves as a testament to the indomitable spirit that fueled early Vietnamese resistance, setting a precedent for future generations in their pursuit of sovereignty and national identity. Their story is woven into the fabric of Vietnamese history, embodying the resilience and unity that became hallmarks of the ongoing struggle against foreign incursions."
},
{
"paragraphText": "In examining the American Vietnam War and drawing parallels to modern times, one might find a modern-day equivalent to the economic and social pressures faced by the Vietnamese under French colonial rule in the challenges experienced by nations grappling with neocolonial economic structures. Neocolonialism refers to the indirect economic and cultural influence that former colonial powers maintain over their former colonies, often perpetuating economic imbalances and exploitation."
},
I get the following result:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<bookId>35972826-85ec-4877-99dd-32a9f14587ec</bookId>
<bookTitle>The Vietnam War</bookTitle>
<parts>
<partTitle>The Genesis of Conflict</partTitle>
<chapters>
<chapterTitle>Colonial Tensions and the Rise of Ho Chi Minh</chapterTitle>
<sections>
<sectionTitle>The Seeds of Rebellion</sectionTitle>
<paragraphs>
<paragraphText>EDITED CHAPTER CONTENT In exploring the spirit of early Vietnamese resistance against the French, one poignant anecdote revolves around the legendary Trung Sisters, Trung Trac, and Trung Nhi. In the first century AD, they embodied the fervent resistance against foreign domination. Facing the oppressive rule of the Chinese Han Dynasty, the Trung Sisters rallied their fellow Vietnamese in a daring revolt. Their leadership and courage inspired a formidable army that successfully expelled the Chinese forces, declaring a brief but significant period of Vietnamese independence.</paragraphText>
</paragraphs>
<paragraphs>
<paragraphText>The Trung Sisters' tale resonates as a powerful symbol of unwavering determination against external forces. Their commitment to liberating their homeland became a rallying cry for future generations of Vietnamese resisting foreign dominance. This early episode laid a foundation for the enduring spirit of resistance that continued to shape Vietnam's struggle against various colonizers, including the French in the subsequent centuries.</paragraphText>
</paragraphs>
<paragraphs>
<paragraphText>The Trung Sisters' legacy serves as a testament to the indomitable spirit that fueled early Vietnamese resistance, setting a precedent for future generations in their pursuit of sovereignty and national identity. Their story is woven into the fabric of Vietnamese history, embodying the resilience and unity that became hallmarks of the ongoing struggle against foreign incursions.</paragraphText>
</paragraphs>
<paragraphs>
<paragraphText>In examining the American Vietnam War and drawing parallels to modern times, one might find a modern-day equivalent to the economic and social pressures faced by the Vietnamese under French colonial rule in the challenges experienced by nations grappling with neocolonial economic structures. Neocolonialism refers to the indirect economic and cultural influence that former colonial powers maintain over their former colonies, often perpetuating economic imbalances and exploitation.</paragraphText>
</paragraphs>
when I expected all <paragraphText>
nodes to be contained in one <paragraphs>
node.
from node-xml2js.
Related Issues (20)
- Regressions when trying to update to 0.5.0 HOT 3
- Options
- Error: Unexpected Close Tag HOT 2
- XML elements "<constructor>" ignored since 0.6.0 HOT 10
- Screenshot (Jun 25, 2023 09:28:59) HOT 1
- IMG_20230617_112451134_BURST000_COVER.jpg
- Potential Security Vulnerabilities Detected in Package
- Are all properties now intended to be readonly since `v0.6.1`? Error "TypeError: Cannot assign to read only property 'OtherProperty' of object '#<Object>'" after the update HOT 3
- xml2js documentation/changelogs HOT 1
- Is there a best practice method to getting the featured image of an rss feed post?
- this.removeAllListeners is not a function HOT 5
- xml2js.bc.js file in npm package HOT 2
- Error occurs when using empty nodes: Text data outside of root node HOT 3
- parseNumbers returns NaN on empty strings. HOT 2
- return parsed object instead of string ? HOT 3
- Missing Copyright license holder HOT 1
- Typescript definitions in DefinitelyTyped repo is updated with version 0.6.x? HOT 3
- XML escape characters are converting while converting XML to JSON
- non-breaking space trips up the parser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-xml2js.