¿Cómo puedo analizar datos SOAP en React Native? Necesito ayuda, por favor que alguien me ayude, lo intenté, si escribo console.log(channels[0]); es salida; sólo {
El contenido de la vista aparece en blanco en la pantalla.
constructor(props) { super(props); this.state = ({ channels: [], }); } componentDidMount() { axios.post('xxxx', xmls, { headers: { 'Content-Type': 'text/xml', Accept: 'application/xml', }, }) .then((response) => { const channels = convert.xml2json(response.data, {alwaysArray:true,ignoreAttributes: true, compact: true, ignoreDeclaration: true, fullTagEmptyElement: true, spaces: 4 }) this.setState({ channels: [] }) console.log(channels); }) .catch(err => console.log(err)); } render() { return ( <View> {this.channels.map((v, id) => { <View key={id}>{v.item}</View> })} </View> ) }}