일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- timeinput
- gitignore
- node
- yml
- electron-builder
- react
- API Gateway
- Route53
- react DOM
- react-sortable-hoc
- 가상 DOM
- zerocho
- window.postMessage
- xlsx
- JavaScript
- icrawler
- electron
- react-admin
- readableStream
- signIn
- react-hook-form
- dynamodb
- AWS
- cognito
- jimp
- react-xml-parser
- 프로그래머스
- domtoimage
- axios
- TypeScript
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