[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: R: Reading XML with &Amp; as part of string
Scott
do you want me out of here and discontinue support of your Open Source
products - I can place a big red cross over my model with a comment
that
they are not supported from the time you became a partner in Profound
logic
[1]http://192.185.226.162/~servus/pextdrupal/sites/all/themes/theme548/
images/powerEXT_Core.png
just let me know
On Thu, Nov 7, 2013 at 7:46 PM, Scott Klement <[2]sk@xxxxxxxxxxxxxxxx>
wrote:
� �What you describe is the correct and expected behavior for the
XPATH
� �program. �The purpose of that program was to demonstrate how
to keep
� �track of the parent elements of each XML tag by putting them in
a
� �'path'.
� �It does not, however, attempt to consolidate the character data
between
� �the elements into a single string, it doesn't need to because
that's
� �not what that program was trying to demonstrate. For an example
of
� �consolidating the character data, see the CHARDATA2 example.
� �This mailing list is only for discussing the HTTPAPI and FTPAPI
open
� �source tools. � A discussion of Expat should be held on a
� �general-purpose list or forum, such as one of these:
� �[1][3]http://www.midrange.com �(use the RPG400-L e-mail list)
� �[2][4]http://www.code400.com (use the RPG forum)
� �[3][5]http://forums.iprodeveloper.com (use the RPG forum)
� �For this mailing list, please keep to the topic of HTTPAPI,
WSDL2RPG or
� �FTPAPI. �Thanks!!
� �On 11/7/2013 2:36 AM, [4][6]Venter.Derick@xxxxxxxxxxxxxx wrote:
� �Hi Scott
� �No I am not using the HTTPAPI's XML parser. We installed the
LIBEXPAT
� �library from your web site and I am using the USERDATA.rpgle as an
� �example for my program. (Sorry not the XPATH.rpgle as i mentioned
in my
� �previous mail)
� �It seems like it is reading the text after the &. If i print
the
� �value to the spoolfile it prints an & and then on the next line
the
� �rest of the text.
� �eg:
� �&
� � Num2
� �Here's the code to read the value from the tag:
� � � � � � � � �WHEN �d.stack(d.depth) =
'/soapenv:Envelope/soapenv:Body'
� �+'/p1:CorticonResponse/p1:WorkDocuments'
� � � � � � � � � � � � � � � � � � � � �+'/p1:Process'
� � � � � � � � � � � � � � � � � � � � �+'/p1:routeProcessStep';
� � � � � � � � �PrintMe = �%TRIM(%char(val));
� � � � � � � � �Except Print;
� � � � � � � � �DoW %Scan(' & ': %TRIM(%char(val))) >
*Zeros;
� � � � � � � � � �val = %Replace('&' : %TRIM(%char(val))
� � � � � � � � � �: %Scan(' & ': %TRIM(%char(val))): 7);
� � � � � � � � �EndDo;
� � � � � � � � �PrintMe = �%TRIM(%char(val));
� � � � � � � � �Except Print;
� � � � � � � � �%OCCUR(PROCESSDATA) = d.procCnt;
� � � � � � � � �PROCESSDATA.RTEPROCSTEP = %TRIM(%char(val));
� �Here's my xml:
� �<?xml version="1.0" encoding="UTF-8"?>
� �<soapenv:Envelope
� �xmlns:soapenv="[1][5][7]http://schemas.xmlsoap.org/soap/envelope/"
� �xmlns:xsd="[2][6][8]http://www.w3.org/2001/XMLSchema"
� �xmlns:xsi="[3][7][9]http://www.w3.org/2001/XMLSchema-instance">
� �<soapenv:Body>
� � �<p1:CorticonResponse ccExeStart="1383656944646"
� �ccExeStop="1383656944677" decisionServiceName="cascading"
� �xmlns:p1="urn:Corticon">
� � � �<p1:WorkDocuments
� �xmlns:xsi="[4][8][10]http://www.w3.org/2001/XMLSchema-instance">
� � � � �<p1:Process id="HBCB20130822002338316B20130822002338318"
� �newOrModified="true">
� � � � � �<p1:lengthYieldFactor>0</p1:lengthYieldFactor>
� � � � � �<p1:lineOperationMode>RECL</p1:lineOperationMode>
� � � � � �<p1:overwindEntryCode>O</p1:overwindEntryCode>
� � � � � �<p1:overwindExitCode>O</p1:overwindExitCode>
� � � � � �<p1:pcpIndicator>true</p1:pcpIndicator>
� � � � � �<p1:processCode>HBC</p1:processCode>
� � � � � �<p1:routeProcessStep>Num1 &
Num2</p1:routeProcessStep>
� � � � � �<p1:trimmingYieldFactor>0</p1:trimmingYieldFactor>
� � � � � �<p1:inProduct href="#B20130628002168289"/>
� � � � � �<p1:outProduct href="#Product_id_1"/>
� � � � � �<p1:workstation
� �href="HBCAP1B20130822002338316B20130822002338318"/>
� � � � �</p1:Process>
� � � � �</p1:WorkDocuments>
� � � �<p1:Messages version="1"/>
� � �</p1:CorticonResponse>
� �</soapenv:Body>
� �</soapenv:Envelope>
� �Derick Venter
� �Applications Developer IV
� �[[9]cid:_4_098DBB8C098DB78C002F47D142257C1C]
� �Systems Integration
� �Tel: [11]+27 (13) 247 2816 Fax: [12]+27 (0) 86 573 2274
� �Cell: [13]+27 (0) 83 458 6599
� �Email: [[10]5][14]derick.venter@xxxxxxxxxx
� �[6][15]www.gijima.com
� �From: � � � �Scott Klement [11]<[16]sk@xxxxxxxxxxxxxxxx>
� �To: � � � �HTTPAPI and FTPAPI Projects
[12]<[17]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
� �Date: � � � �2013/11/06 05:09 PM
� �Subject: � � � �Re: R: Reading XML with &Amp; as part of
string
� �Sent by: � � � �[13][18]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� � �__________________________________________________________________
� �So you are not using HTTPAPI's XML parser?!
� �On 11/6/2013 8:12 AM, [14][19]Venter.Derick@xxxxxxxxxxxxxx wrote:
� �> � � The replacement of & with & works with plain RPG code
using a
� �> � � string value.
� �> � � The problem is that the reader of the xml field seems to
read
� �&
� �> � � correct but the rest of the string is thrown away.
� �> � � When I print the value to the spool file, I see the
following:
� �> � � &
� �> � � the rest of my string.
� �> � � Seems that the reader is adding a next line character.
� �> � � I used Scott Klement's XPATH example to read through my
XML
� �document
� �> � � and parse it.
� �> � � Any ideas?
� �> � � Derick Venter
� �> � � Applications Developer IV---
� �---------------------------------------------------------------------
--
� �This is the FTPAPI mailing list. �To unsubscribe, please go to:
� �[7][15][20]http://www.scottklement.com/mailman/listinfo/ftpapi
� �---------------------------------------------------------------------
--
� � �__________________________________________________________________
� �This e-mail is subject to the Columbus Stainless [Pty] Ltd Email
Legal
� �Notices available at:
� �[8][16][21]http://www.columbus.co.za/EmailLegalNotice.htm.
� � �__________________________________________________________________
� �This e-mail message has been scanned for Viruses and Content and
� �cleared by MailMarshal
� � �__________________________________________________________________
References
� �1. [17][22]http://schemas.xmlsoap.org/soap/envelope/
� �2. [18][23]http://www.w3.org/2001/XMLSchema
� �3. [19][24]http://www.w3.org/2001/XMLSchema-instance
� �4. [20][25]http://www.w3.org/2001/XMLSchema-instance
� �5. [21]mailto:[26]derick.venter@xxxxxxxxxx
� �6. [22][27]http://www.gijima.com/
� �7. [23][28]http://www.scottklement.com/mailman/listinfo/ftpapi
� �8. [24][29]http://www.columbus.co.za/EmailLegalNotice.htm
-----------------------------------------------------------------------
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[25][30]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
References
� �1. [31]http://www.midrange.com/
� �2. [32]http://www.code400.com/
� �3. [33]http://forums.iprodeveloper.com/
� �4. mailto:[34]Venter.Derick@xxxxxxxxxxxxxx
� �5. [35]http://schemas.xmlsoap.org/soap/envelope/
� �6. [36]http://www.w3.org/2001/XMLSchema
� �7. [37]http://www.w3.org/2001/XMLSchema-instance
� �8. [38]http://www.w3.org/2001/XMLSchema-instance
� �9. cid:_4_098DBB8C098DB78C002F47D142257C1C
� 10. mailto:[39]5][40]derick.venter@xxxxxxxxxx
� 11. mailto:[41]sk@xxxxxxxxxxxxxxxx
� 12. mailto:[42]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
� 13. mailto:[43]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
� 14. mailto:[44]Venter.Derick@xxxxxxxxxxxxxx
� 15. [45]http://www.scottklement.com/mailman/listinfo/ftpapi
� 16. [46]http://www.columbus.co.za/EmailLegalNotice.htm
� 17. [47]http://schemas.xmlsoap.org/soap/envelope/
� 18. [48]http://www.w3.org/2001/XMLSchema
� 19. [49]http://www.w3.org/2001/XMLSchema-instance
� 20. [50]http://www.w3.org/2001/XMLSchema-instance
� 21. mailto:[51]derick.venter@xxxxxxxxxx
� 22. [52]http://www.gijima.com/
� 23. [53]http://www.scottklement.com/mailman/listinfo/ftpapi
� 24. [54]http://www.columbus.co.za/EmailLegalNotice.htm
� 25. [55]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[56]http://www.scottklement.com/mailman/listinfo/ftpapi
--------------------------------------------------------------------
---
--
Regards,
Henrik Rützou
� [57]http://powerEXT.com
�
References
1. http://192.185.226.162/~servus/pextdrupal/sites/all/themes/theme548/images/powerEXT_Core.png
2. mailto:sk@xxxxxxxxxxxxxxxx
3. http://www.midrange.com/
4. http://www.code400.com/
5. http://forums.iprodeveloper.com/
6. mailto:Venter.Derick@xxxxxxxxxxxxxx
7. http://schemas.xmlsoap.org/soap/envelope/
8. http://www.w3.org/2001/XMLSchema
9. http://www.w3.org/2001/XMLSchema-instance
10. http://www.w3.org/2001/XMLSchema-instance
11. tel:%2B27%20%2813%29%20247%202816
12. tel:%2B27%20%280%29%2086%20573%202274
13. tel:%2B27%20%280%29%2083%20458%206599
14. mailto:derick.venter@xxxxxxxxxx
15. http://www.gijima.com/
16. mailto:sk@xxxxxxxxxxxxxxxx
17. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
18. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
19. mailto:Venter.Derick@xxxxxxxxxxxxxx
20. http://www.scottklement.com/mailman/listinfo/ftpapi
21. http://www.columbus.co.za/EmailLegalNotice.htm
22. http://schemas.xmlsoap.org/soap/envelope/
23. http://www.w3.org/2001/XMLSchema
24. http://www.w3.org/2001/XMLSchema-instance
25. http://www.w3.org/2001/XMLSchema-instance
26. mailto:derick.venter@xxxxxxxxxx
27. http://www.gijima.com/
28. http://www.scottklement.com/mailman/listinfo/ftpapi
29. http://www.columbus.co.za/EmailLegalNotice.htm
30. http://www.scottklement.com/mailman/listinfo/ftpapi
31. http://www.midrange.com/
32. http://www.code400.com/
33. http://forums.iprodeveloper.com/
34. mailto:Venter.Derick@xxxxxxxxxxxxxx
35. http://schemas.xmlsoap.org/soap/envelope/
36. http://www.w3.org/2001/XMLSchema
37. http://www.w3.org/2001/XMLSchema-instance
38. http://www.w3.org/2001/XMLSchema-instance
39. mailto:5
40. mailto:derick.venter@xxxxxxxxxx
41. mailto:sk@xxxxxxxxxxxxxxxx
42. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
43. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
44. mailto:Venter.Derick@xxxxxxxxxxxxxx
45. http://www.scottklement.com/mailman/listinfo/ftpapi
46. http://www.columbus.co.za/EmailLegalNotice.htm
47. http://schemas.xmlsoap.org/soap/envelope/
48. http://www.w3.org/2001/XMLSchema
49. http://www.w3.org/2001/XMLSchema-instance
50. http://www.w3.org/2001/XMLSchema-instance
51. mailto:derick.venter@xxxxxxxxxx
52. http://www.gijima.com/
53. http://www.scottklement.com/mailman/listinfo/ftpapi
54. http://www.columbus.co.za/EmailLegalNotice.htm
55. http://www.scottklement.com/mailman/listinfo/ftpapi
56. http://www.scottklement.com/mailman/listinfo/ftpapi
57. http://powerext.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------