종료

Parse an xml file using fast-xml-parser -- 2

I need to parse an xml file that is inside another xml file. Please modify the follow code to parse it correctly. Thank you.

You should use the package [login to view URL]

The second xml is on the route ["AttachedDocument"]["cac:Attachment"]["cac:ExternalReference"]["cbc:Description"]

When you parse it you should be able to get an json object. To check if is working you should be able to get the route ["Invoice"]["cbc:ID"] on the second xml.

//Parse xml file Intermediate obj

const tObj = [login to view URL](xmlData,options); //[login to view URL](data, 'base64').toString()

const jsonObj = [login to view URL](tObj,options);

const prueba = jsonObj["Invoice"];

if(prueba != undefined){

numFactura = jsonObj["Invoice"]["cbc:ID"];

saveInvoice(jsonObj,numFactura);

} else {

//Get Invoice text

const invoice = jsonObj["AttachedDocument"]["cac:Attachment"]["cac:ExternalReference"]["cbc:Description"].toString();

const tObj1 = [login to view URL](invoice,options);

const jsonObj1 = [login to view URL](tObj1, options).toString();

numFactura = 'Prueba2'; //jsonObj1["Invoice"]["cbc:ID"];

saveInvoice(jsonObj1,numFactura);

기술: 자바 스크립트, 제이손(JSON), node.js, XML

확대 보기: saving grid data xml file using extjs, mysql xml file using php, read xml file using net insert sql server, fast-xml-parser github, fast-xml-parser example, fast-xml-parser demo, npm fast-xml-parser, fast-xml-parser typescript, npm xml parser, javascript xml parser, typescript xml parser, parsing xml file using vbnet, using excel parse file, create xml file using mysql, edit xml file using flash, read xml file using extjs, multiuser xml file using php, extract data xml file using 2008, create xml file using mysql php, search text xml file using script

고용주 소개:
( 10건의 리뷰 ) Bogota, Colombia

프로젝트 ID: #24523804

이 프로젝트의 입찰 현황은 다음과 같습니다. 입찰자: 17명, 평균 입찰가: $28

VileGnosis

I can make this multi-level parser. My average project completion time is within 3-5 hours on the same day. The skills I have include PHP, HTML5, CSS3, JavaScript, jQuery, WordPress Themes & Plugins, Web Scrapers & Aut 더 보기

$30 USD (1일 이내)
(117 리뷰)
6.3
qprotex

Hello, My name is Miguel Febres and you can locate my resume and certifications in the following links: [login to view URL] [login to view URL] In my 10+ years of experien 더 보기

$30 USD (7일 이내)
(25 리뷰)
5.9
vano101

Hello I have experience with JavaScript , including working with XML parsing. I checked fast-xml-parser and it looks easy to use.

$25 USD (2일 이내)
(113 리뷰)
5.7
Ahmed818

Hello, ⭐⭐⭐⭐⭐ i am interested in this project , can begin now waiting your answer on chat Regards ⭐⭐⭐⭐⭐

$30 USD (1일 이내)
(45 리뷰)
4.6
vinod150987

Hi I hope you are well. I am a Software Developer with 9+ years of experience in .NET technologies e.g. C#, VB.NET, ASP.NET, WCF, Web Services, Javascript, JQuery, Node.js, Angular.js, D3.js, [login to view URL], SQL, XML ,XSLT 더 보기

$30 USD (7일 이내)
(11 리뷰)
3.6
BernardoLima

Hello there! :) I am an experienced developer and I can help you with this project! Send me a message so we can discuss details and start it already!

$23 USD (1일 이내)
(7 리뷰)
3.2
ecksdeegege

Thanks for submitting a project. You’re looking for a expert. As I am an talent web full-stack deleloper with JSON, XML, JAVASCRIPT, CakePHP for 9years. This is exactly what I specialise in. Talk about a perfect ma 더 보기

$50 USD (7일 이내)
(2 리뷰)
2.0
BLESSED247

Hi. How are you? I am a full stack senior developer having lots of experiences on Web development for more than 7 years. I read your task description carefully. I will do my best for your success and will be responsibl 더 보기

$20 USD (7일 이내)
(1 리뷰)
1.9
Pashakolp31

Dear Client, my name is Pavel and I’m a Web Developer from Russia who is specialized in JavaScript and PHP. I have 6 years of experience in JavaScript and PHP, working as an independent freelancer for 4 years now, both 더 보기

$15 USD (1일 이내)
(2 리뷰)
0.8
veridicalDevelo1

Hi, Client! Thanks for the opportunity. I read your requirements carefully. I have deep experiences in NodeJs. If you give me the assignment, I will satisfy you with good result. And I will always dedicate myself f 더 보기

$20 USD (3일 이내)
(1 리뷰)
0.5
storkj

Hi, Now, i'm avalible I'm a Web developer with 2+ yearh exp. My skill: PSD to HTML, Sass, bootstrap, javascript, es6, reactjs, nodejs, express, mobile, UI, animation. Please send me a psd and we can work together. I 더 보기

$27 USD (3일 이내)
(1 리뷰)
0.1
WangXiaoNi81

Hi, sir! I have a rich experience of parsing xml and json. I have checked my attachment file and I am sure I can parse it correctly. Let's have a chat and start work right now. best regards.

$25 USD (1일 이내)
(0 리뷰)
0.0
VitaliiVozniy

Hello. I have just read your opinions all. I understand what you mean and I can do it enough. if you are interested in me, please contact me without any thinking. I look forward to having a great, successful and reward 더 보기

$20 USD (1일 이내)
(0 리뷰)
0.0
gvmtech

Hi, How are you? I've read the job description carefully and understood the requirements. Yes, I'll do it now. CAN WE DISCUSS MORE IN THE CHAT ROOM? Looking forward to your positive response. Thanks & Regards, Anve 더 보기

$50 USD (1일 이내)
(0 리뷰)
0.0
$25 USD (1일 이내)
(0 리뷰)
0.0
Hyreos

Hi! My name is Renan and I'm a desktop/web developer. I can help you with this on NodeJS. Can you send me a PM so I can send you the job after it's done?

$30 USD (7일 이내)
(1 리뷰)
0.0
luisenriqueramos

Dear friend, I am a skilled engineer with experience in the field you require. Currently I am working in Germany, and part of my experience is in parsing long xml files. The current speed I manage is of 1,5 M of reco 더 보기

$20 USD (15일 이내)
(0 리뷰)
0.0