Compare Proposal

Nothing to compare.

JavaScript/HTML , Python ElementTree XML parser

Urgent
  • Posted at : 7 months ago
  • Post Similar Project
100

Budget
4
Proposals
156
Views
Awarded
Status
Skills Required

Posted By -

PG

5.0
Projects Posted : 6
Projects Paid : 2
Services Purchased : 0
Total Spent :
85
Feedbacks : 100 %

Project Details show (+) hide (-)


Hi, Please find the below requirement of the project.

1. HTML page should include the below details
 fields:  name,
             type,
             implementer, 
             requestor along with that use 
             many items CIName, CIClass combination  
Ideally, the htmlshould contain + symbol  on the UI to add many items of CIName, CIClass combination.

(Note: You have to add a + symbol to allow CIName, CIClass combination so that it will write the same into an xml file using javascript. We can have multiple of this combination all will go under <CIDetails></CIDetails>)

2. Once you submit the html with the above , it should create an XML file using java script in location c:/temp/request.xml

3. We have another xml file under c:/temp/data/manage.xml,  - Its a TEMPLATE file.

4. Using Python 3.6, read the data from c:/temp/request.xml and populate the template xml, however anything appears like CIName, CIClass should be added to TEMPLATE xml under  c:/temp/data/manage.xml at 
manageorderrequest => manageorderrequestdetail  after </OptionalAttrVals>



    <CIlist>
         <CIDetails>  <!--CIDetails tag will be repeated many times each will conatin CIName and CIClass -->
                <CIName>Group1</CIName>
                <CIClass>Application Instance</CIClass>
          </CIDetails>
         <CIDetails>
                <CIName>Group2</CIName>
                <CIClass>Infrastructure Service</CIClass>
         </CIDetails>
    </CIlist>


********************
c:/temp/request.xml
********************
<requests>
  <changerequest id="54321">
    <name>
      <Type>Create</Type> <!-- string -->
      <ScheduleStartDate>12/03/2019 17:00</ScheduleStartDate> <!-- string -->
      <requestor>12345</requestor> <!-- string -->
      <sourcecr>cr123313</sourcecr>
      <sourcecr>OwningGroup</sourcecr>
    </name>
    <CIlist>
         <CIDetails>  <!--CIDetails tag will be repeated many times each will conatin CIName and CIClass -->
                <CIName>Group1</CIName>
                <CIClass>Application Instance</CIClass>
          </CIDetails>
         <CIDetails>
                <CIName>Group2</CIName>
                <CIClass>Infrastructure Service</CIClass>
         </CIDetails>
    </CIlist>
  </changerequest>
</requests>

****************************************
c:/temp/data/manage.xml
****************************************
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
http://www.yoyo.com/req/rest/manageorderrequest_v3.0.xsd" action="Create" function="manageorderrequest" genDateTZ="0" version="3.0">
  <ApplicationID>LOTSTODO</ApplicationID>
  <manageorderrequestdetail>
    <sourcecr>CR13182</sourcecr>
    <AuditUser>123456789</AuditUser>
    <ScheduleStartDate>{{ScheduleStartDate}}</ScheduleStartDate>
    <ScheduleDuration>86400</ScheduleDuration>
    <project>
      <details>
        <id>No Project</id>
      </details>
    </project>
    <OptionalAttrVals>
      <ChgString>Requestor</ChgString>
      <ChgString>{{requestor}}</ChgString>
      <ChgString>OwningGroup</ChgString>
      <ChgString>{{OwningGroup}}</ChgString>
    </OptionalAttrVals>
  </manageorderrequestdetail>
</manageorderrequest>


**************************************************************
final output xml file under c:/tmp/data/finaloutput.xml
**************************************************************

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
http://www.yoyo.com/req/rest/manageorderrequest_v3.0.xsd" action="Create" function="manageorderrequest" genDateTZ="0" version="3.0">
  <ApplicationID>LOTSTODO</ApplicationID>
  <manageorderrequestdetail>
    <sourcecr>CR13182</sourcecr>
    <AuditUser>123456789</AuditUser>
    <ScheduleStartDate>12/03/2019 17:00</ScheduleStartDate>
    <ScheduleDuration>86400</ScheduleDuration>
    <project>
      <details>
        <id>No Project</id>
      </details>
    </project>
    <OptionalAttrVals>
      <ChgString>Requestor</ChgString>
      <ChgString>12345</ChgString>
      <ChgString>OwningGroup</ChgString>
      <ChgString>RG</ChgString>
    </OptionalAttrVals>
    <CIlist>
         <CIDetails>  <!--CIDetails tag will be repeated many times each will conatin CIName and CIClass -->
                <CIName>Group1</CIName>
                <CIClass>Application Instance</CIClass>
          </CIDetails>
         <CIDetails>
                <CIName>Group2</CIName>
                <CIClass>Infrastructure Service</CIClass>
         </CIDetails>
    </CIlist>
  </manageorderrequestdetail>
</manageorderrequest>

Your Job Feed