Hi I wanted to show xml view in my application. To achieve that I was using react-xml-viewer but also I wanted to add all expand and collapse functions aswell when I check react-xml-viewer I couldn’t see it. Is there any way to achieve this with react-xml-viewer or is there any package that I can use. Both solution is ok for me.
import React from 'react';
import XMLParser from "react-xml-parser";
import * as s from './XMLDetail.styles';
import XMLViewer from "react-xml-viewer";
const XMLDetail = props => {
const {
isDarkMode = false,
appHdrData = "",
documentData = "",
isOpenButton=false,
} = props;
//Return
return (
<div>
<s.ColumnContainer>
<s.Customlabel isOpenButton={isOpenButton} >Header</s.Customlabel>
<s.Customlabel isOpenButton={isOpenButton} >Document</s.Customlabel>
</s.ColumnContainer>
<s.XMLDetailContainer>
<s.XMLContainer isOpenButton={isOpenButton}>
<XMLViewer xml={appHdrData}/>
</s.XMLContainer>
<s.XMLContainer isOpenButton={isOpenButton}>
<XMLViewer xml={documentData}/>
</s.XMLContainer>
</s.XMLDetailContainer>
</div>
)
}
export default XMLDetail