1. Attn: jmduro xml_parser

Hallo are there any restrictions for using your http://www.rapideuphoria.com/xml_parser.zip or is it completly free to use?

Andreas

new topic     » topic index » view message » categorize

2. Re: Attn: jmduro xml_parser

Hi Andy,

All code I publish is entirely free without any restriction (public domain).

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

3. Re: Attn: jmduro xml_parser

jmduro said...

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: Attn: jmduro xml_parser

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: Attn: jmduro xml_parser

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] 
 
new topic     » goto parent     » topic index » view message » categorize

6. Re: Attn: jmduro xml_parser

jmduro said...

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

new topic     » goto parent     » topic index » view message » categorize

7. Re: Attn: jmduro xml_parser

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

new topic     » goto parent     » topic index » view message » categorize

8. Re: Attn: jmduro xml_parser

jmduro said...

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

new topic     » goto parent     » topic index » view message » categorize

9. Re: Attn: jmduro xml_parser

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)" smile https://de.wikipedia.org/wiki/It%E2%80%99s_a_Long_Way_to_Tipperary

Regards

Jean-Marc

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu