You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to use xmldoc to parse an in-memory XML string in my React-Native Project
in addtion,i have to 'npm install xmldoc' an the directory of my project.
in this case
`import React, { Component } from 'react';
import { AppRegistry, Text, View } from 'react-native';
class AwesomeProject extends Component {
render() {
this.testXml();
return (
<View style={{alignItems: 'center'}}>
浪费时间
);
}
testXml(){
// Demonstrate parsing an in-memory XML string
var xmldoc = require('xmldoc');
var xmlString = '';
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);`
but caused an error
*Unable to resolve module stream from /Volumes/MAC/ReactNative/AwesomeProject/node_modules/sax/lib/sax.js: Unable to find this module in its module map or any of the node_modules directories under /Volumes/node_modules/stream and its parent directories
*
how to solve the issue ,can you help me?
The text was updated successfully, but these errors were encountered:
thanks!!!
i have soloved the problem
if i want to use xmldoc to parse an in-memory XML , 'nmp install buffer' and 'npm install stream ' must be done first;
i want to use xmldoc to parse an in-memory XML string in my React-Native Project
in addtion,i have to 'npm install xmldoc' an the directory of my project.
in this case
`import React, { Component } from 'react';
import { AppRegistry, Text, View } from 'react-native';
class AwesomeProject extends Component {
render() {
this.testXml();
return (
<View style={{alignItems: 'center'}}>
浪费时间
);
}
testXml(){
// Demonstrate parsing an in-memory XML string
var xmldoc = require('xmldoc');
var xmlString = '';
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);`
but caused an error
*Unable to resolve module stream from /Volumes/MAC/ReactNative/AwesomeProject/node_modules/sax/lib/sax.js: Unable to find this module in its module map or any of the node_modules directories under /Volumes/node_modules/stream and its parent directories
*
how to solve the issue ,can you help me?
The text was updated successfully, but these errors were encountered: