Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Generate XML File?

  1. #11
    Hi All, I am trying to use B34A1190 by copying and changing the encoding to UTF-8 as suggested in the above solution. Everything works fine - its adding the tags(elements), attributes perfectly and generating the XML except that its replacing the colon in the tag name by an underscore and its all through the API For e.g.


    <cbc:UBEVersionID>1.0</cbc:UBEVersionID> is being written as <cbc_VersionID>1.0</cbc:UBEversionID>


    Now since colon is a special character to an XML, with UTF- encoding it should be written in a different way as I read about it. So while writing the element name as a parameter i tried using


    ElementName as 'cbc&58#;UBEVersionID' but still doesnt work. Doed anyone has a clue, how can we insert that colon in teh tag name and not getting it replaced it with an underscore. Any help is appreciated.

  2. #12
    Member
    Join Date
    Jul 2014
    Location
    Madrid, Spain
    Posts
    114
    Quote Originally Posted by chawla.sheetal View Post
    Hi All, I am trying to use B34A1190 by copying and changing the encoding to UTF-8 as suggested in the above solution. Everything works fine - its adding the tags(elements), attributes perfectly and generating the XML except that its replacing the colon in the tag name by an underscore and its all through the API For e.g.


    <cbc:UBEVersionID>1.0</cbc:UBEVersionID> is being written as <cbc_VersionID>1.0</cbc:UBEversionID>


    Now since colon is a special character to an XML, with UTF- encoding it should be written in a different way as I read about it. So while writing the element name as a parameter i tried using


    ElementName as 'cbc&58#;UBEVersionID' but still doesnt work. Doed anyone has a clue, how can we insert that colon in teh tag name and not getting it replaced it with an underscore. Any help is appreciated.
    Hi chawla.sheetal,

    I didn't use special characters so I don't know. But you should have care because B34A1190 generate xml in UTF-16 and not in UTF-8, you can see it in xml header. Can you try to generate XML File with B4303900 - WriteXMLDocumentToFile? This BSFN generate XML in UTF-8, and it's posible that generate doble dot.

    Tell me if this solution works or not, please.

    Regards.
    JDE E1 Senior Developer Consultant

  3. #13
    Hello,

    You can use B0000201 BSFN to write the xml file.

  4. #14
    Member
    Join Date
    Dec 2002
    Location
    Italy
    Posts
    148
    Quote Originally Posted by craig_welton View Post
    Try using B4303900.WriteXMLDocumentToFile. That uses the XRCS_serializeDocumentToFileWithEncoding API passing UTF_8.

    Craig
    Hi Craig,

    I'm currently using B74XML01 which is indeed using XRCS_serializeDocumentToFileWithEncoding API, but I noticed the output XML file does not have any CR-LF.

    In other words: opening the XML file with Notepad++ I can see just 1 line, even though all validations seems correct (I'm talking about XSD validation).

    If I open XML file with XML Notepad and I save it I'm gonna get what I need, thus CR-LF to separation.

    Can you help me on that ?

    Thanks,

    Carlo

  5. #15
    Member
    Join Date
    Mar 2005
    Location
    São Paulo / Brazil
    Posts
    51
    You could use Microsoft XML Notepad 2007, to view and edit an XML file easily.

    From the site

    XML Notepad 2007 provides a simple intuitive user interface for browsing and editing XML documents.
    Edit: I didn't see that you are already being using XML Notepad, please discard this reply
    Last edited by LHoffman; 09-28-2017 at 08:36 AM.

  6. #16
    Senior Member peterbruce's Avatar
    Join Date
    Jan 2004
    Location
    NSW Australia
    Posts
    2,139
    Carlo,

    That happens when the file is created on a unix box and viewed on a windows box. We use a simple unix script to convert files from unix to windows.

    Unix only uses CR (I think - in any case it's only one value) and windows uses the CR and LF combination.
    Thanks, Peter

    "Give a person a fish, feed them for a day, teach them how to fish, feed them for a lifetime."

    E9.1 TR9.1.2.1, Enterprise Server: Sun, Database Server: Sun, Oracle DB: 11g, Weblogic.
    Create!form 7

  7. #17
    Member
    Join Date
    Dec 2002
    Location
    Italy
    Posts
    148
    Quote Originally Posted by peterbruce View Post
    Carlo,

    That happens when the file is created on a unix box and viewed on a windows box. We use a simple unix script to convert files from unix to windows.

    Unix only uses CR (I think - in any case it's only one value) and windows uses the CR and LF combination.
    Thank you Peter,

    yes I know Unix behave differently but here I'm not running JDE within a Unix server.

    It seems to me the difference is between XRCS APIs and embedded BI-Publisher:
    with the first one no CR&LF at all.

    In order to add CR&LF I found the following tricks:

    1. Use XML Notepad (open and save the file).
    2. Use Notepad++ (XML Tool plugin and function "Pretty Print with line breaks").
    3. Use XSL transformation with proper command.

    Kind regards,

    Carlo

  8. #18
    Quote Originally Posted by vijaypatil007 View Post
    Hello,

    You can use B0000201 BSFN to write the xml file.

    Hi,
    I am using
    Add XML Element String Xerces Wrapper
    Source Module : B0000201
    Member Description : Add XML Element String Xerces Wrapper
    It maximum length is 256 characters.
    I need to pass more than that, how could i mange?
    help me

  9. #19
    Senior Member
    Join Date
    Mar 2004
    Location
    Fort Worth, Texas
    Posts
    1,529
    One option is you can create you own C BSFN to generate the XML document. As the BSFN you referenced indicates, JDE has JDE specific C APIs for generating and parsing XML documents that are really just thin wrappers around the Xerces XML APIs (the underlying implementation may actually be from IBM I think). Regardless, when using the JDE C API wrappers you can pretty much use the documentation from http://xerces.apache.org/.
    Brian Oster
    Application Development Manager
    E1: 9.0 (TR9.1.5.1) / 9.2 (TR9.2.2.2)
    JAS/BSSV: Weblogic 12.1.2 / Weblogic 12.2
    ES: Win2008 / Win2016
    DB: MSSQL 2014 / 2016
    WebDev Client: Win7Pro / Win10Pro

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.