XML Addon Questions

Home Forums Problems and solutions in GDL GDL add-ons XML Addon Questions

Viewing 1 reply thread
  • Author
    Posts
    • #2929
      Joachim Sühlo
      Participant

      See the following XML-Code:

        <?xml version="1.0" encoding="UTF-8"?>
      <database>
        <product id="ABC-DEF-GHI-123-456-781">
          <product_infos><![CDATA[FRA-010593|FRA-010593-A-stop|0|0.0|36|0|0|0|032.5|147.5|]]></product_infos>
          <product_infos><![CDATA[FRA-204699|FRA-204699-stop|0|0.0|36|0|0|0|090.0|]]></product_infos>
          <product_infos><![CDATA[FRA-010592|FRA-010592-A-stop|0|0.0|204|0|0|0|055.0|125.0|]]></product_infos>
        </product>
        <product id="ABC-DEF-GHI-123-456-785">
          <product_infos><![CDATA[FRA-010593|FRA-010593-A-stop|0|0.0|36|0|0|0|032.5|147.5|]]></product_infos>
          <product_infos><![CDATA[FRA-204699|FRA-204699-stop|0|0.0|36|0|0|0|090.0|]]></product_infos>
          <product_infos><![CDATA[FRA-010592|FRA-010592-A-stop|0|0.0|214|0|0|0|055.0|125.0|]]></product_infos>
        </product>
        <product id="ABC-DEF-GHI-123-456-789">
          <product_infos><![CDATA[FRA-010593|FRA-010593-A-stop|0|0.0|36|0|0|0|032.5|147.5|]]></product_infos>
          <product_infos><![CDATA[FRA-204699|FRA-204699-stop|0|0.0|36|0|0|0|090.0|]]></product_infos>
          <product_infos><![CDATA[FRA-010592|FRA-010592-A-stop|0|0.0|214|0|0|0|055.0|125.0|]]></product_infos>
        </product>
      </database>

      1. Is it possible, to move to product target nodes directly, by using the ID in the request?
      2. How do I extract the CDATA section?
      3. Would it be more easy to change the XML file?

      GDL Object Developer
      b-prisma
      MAC OSx 10.12

    • #2931
      Gergely Fehér
      Keymaster

      Hi Joachim,

      Here is a post about reading xml files: http://gdl.graphisoft.com/tips-and-tricks/how-to-use-the-gdl-xml-add-on/ In this sample you can check moving to a node with a name – so I think that you can jump to a product node, and check the ID in different steps. There is an example for getting the info from CDATA too.

      Gergely Fehér
      Team Leader, Library Team
      GRAPHISOFT SE

Viewing 1 reply thread
  • The forum ‘GDL add-ons’ is closed to new topics and replies.