일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- icrawler
- dynamodb
- react-sortable-hoc
- xlsx
- react-hook-form
- react-xml-parser
- readableStream
- axios
- signIn
- AWS
- timeinput
- node
- domtoimage
- react DOM
- jimp
- react
- electron-builder
- yml
- cognito
- Route53
- window.postMessage
- TypeScript
- 프로그래머스
- JavaScript
- react-admin
- gitignore
- API Gateway
- zerocho
- 가상 DOM
- electron
Archives
- Today
- Total
꾸준히 공부하는 개발자
[Node.js] XML Parser 본문
dblp.xml 파일을 받아와 이제 파싱을 할 차례이다.
xml을 파싱하는 모든 라이브러리를 사용해 봤는데,
나는 console.dir 을 어떤식으로 사용하는지를 모르겠어서 시중에 가장인기있는 xml2js 이런 모듈들은 이상하게도 작동하지않아 인기가없는 react-xml-parser를 사용하였다. 이런건 사용하면안된다...
const XMLParser = require('react-xml-parser');
const xml = new XMLParser().parseFromString(dblpString); // Assume xmlText contains the example XML
참 간단하다.
'Node.js' 카테고리의 다른 글
[Node.js] url로 img Download (0) | 2020.04.27 |
---|---|
[Node.js] ReadableStream 을 이용한 dblp.xml 파일 받아오기 (0) | 2019.12.20 |
[Node.js] bluebird.js Promise (concurrency) (0) | 2019.12.18 |
[Node.js] Jimp crop을 이용하여, 사진 자르기 (0) | 2019.11.19 |
[Node.js] Jimp 이용하여 비율에 맞게 resize (0) | 2019.11.18 |
Comments