1. Attn: jmduro xml_parser
- Posted by andi49 Jul 17, 2015
- 2343 views
Hallo are there any restrictions for using your http://www.rapideuphoria.com/xml_parser.zip or is it completly free to use?
Andreas
2. Re: Attn: jmduro xml_parser
- Posted by jmduro Jul 18, 2015
- 2289 views
Hi Andy,
All code I publish is entirely free without any restriction (public domain).
Regards
Jean-Marc
3. Re: Attn: jmduro xml_parser
- Posted by andi49 Jul 24, 2015
- 2189 views
Hi Andy,
All code I publish is entirely free without any restriction (public domain).
Regards
Jean-Marc
I used your code in a company project, also i removed all of your debugging code and dependencies to your librarys. The program did the job. The code run about 5 days without problems.(fetching xml files from a server and parsing them).
One wish, maybe add some doc's to your xml_parser.e It will be really helpfull.
Okay, deal. Your parser saved me a lot of time. I update my designer (including tingrid) you write some doc's?
Deal?
Andreas
4. Re: Attn: jmduro xml_parser
- Posted by jmduro Jul 29, 2015
- 2144 views
OK Andreas,
I'll write some doc. Did you get a look at "XML To Sequence" which was the second step to this library. It's main function called xml2sequence is self explanatory:
-- parse xml file s = read_file("lshw.xml") elements = xml2sequence(s)
Regards
Jean-Marc
5. Re: Attn: jmduro xml_parser
- Posted by jmduro Jul 29, 2015
- 2176 views
Here are some explanations for the functions in xml_parser.e:
global function findRecord(sequence sht, integer fld, object seqVal) -- lists records from sheet sht with value seqVal in field fld global function convertHtml(sequence buf) -- converts HTML code to ASCII procedure push(sequence s) -- pushes a sequence in the tags LIFO stack (Last In First Out) function pop() -- pops a sequence from the tags LIFO stack function at(integer i) -- returns sequence at position i in the tags LIFO stack global function tagPath() -- returns the path of the current tag -- ie a sequence containing the tag with all its parent tags -- separated by a slash global procedure showBuffer(integer i) -- show max 60 characters of the buffer starting at position i global function removeEol(sequence s) -- removes all end of lines from sequence function getDelimitedText(sequence delimiter) -- returns text from current position up to next delimiter global function scanTag() -- scans the XML buffer to extract tags in a sequence -- said in other words: converts xml to a sequence global function searchElement(sequence x, sequence variable, sequence elt) -- sequence x is the result of scanTag, the analysis of an XML sequence -- returns the first element of x in part of the sequence path defined by variable -- that matches elt -- if variable is {1,2,3} then search elt in x[1][2][3] global procedure searchAllElements(sequence x, sequence variable, sequence elt) -- sequence x is the result of scanTag, the analysis of an XML sequence -- returns all elements of x in part of the sequence path defined by variable -- that matches elt -- if variable is {1,2,3} then search elt in x[1][2][3]
6. Re: Attn: jmduro xml_parser
- Posted by andi49 Jul 30, 2015
- 2098 views
OK Andreas,
I'll write some doc. Did you get a look at "XML To Sequence" which was the second step to this library. It's main function called xml2sequence is self explanatory:
-- parse xml file s = read_file("lshw.xml") elements = xml2sequence(s)
Regards
Jean-Marc
yep, that's all i used including getParamValue()
again, it saved me allready a lot off time, and it works about 5 days (calling your lib every 5 minutes) to give the results.
i just wished that this great lib has some docs.
Thanks for your quick response
Andreas
7. Re: Attn: jmduro xml_parser
- Posted by jmduro Aug 01, 2015
- 2071 views
xml2sequence is for OpenEuphoria 4. I don't remember writing a version for Euphoria 3.
The first library XML Parser was for Euphoria 3 but did not include this function.
Regards
Jean-Marc
8. Re: Attn: jmduro xml_parser
- Posted by andi49 Aug 01, 2015
- 2077 views
xml2sequence is for OpenEuphoria 4. I don't remember writing a version for Euphoria 3.
The first library XML Parser was for Euphoria 3 but did not include this function.
Regards
Jean-Marc
You have two libs on Rapideuphoria. Both are named "XML to Sequence".
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=xml_parser
Maybe that should be changed. I, for myself, would not use Euphoria 3 for anything.
Andreas
9. Re: Attn: jmduro xml_parser
- Posted by jmduro Aug 02, 2015
- 2086 views
Thank you Andreas,
I'm getting old. I missed the second one. I described the first one only.
I got crashes with win32lib on Seven 64 bits, so I keep both Euphoria 3 and OpenEuphoria 4 in mind.
I know I have to switch to TinEwg. Let me sing it: "It's a long way to TinEWG (Tipperary)" https://de.wikipedia.org/wiki/It%E2%80%99s_a_Long_Way_to_Tipperary
Regards
Jean-Marc