CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   XML (http://www.codingforums.com/forumdisplay.php?f=3)
-   -   Graph generated xml code help (http://www.codingforums.com/showthread.php?t=281827)

RoyLittleo 11-10-2012 05:36 PM

Graph generated xml code help
 
Hi, I am new to the forum and new to xml

I have exported some xml code from a flow chart which contains 3 types of information:-
ID (number)
Question (Text)
Description (Text)
All i need is a xml document that will be read by a form to insert the three fields into a text box, from the small snippet of code below can you tell me if it would be readable or do i need all the information/code that the graph has generated.

How can i make it simpler to read and understand

It doesn't show well on the page here but each section 3,4,5 and 6 are all indented in correctly

Code:

<Section3>
<attribute key="id" type="int">305</attribute>
<attribute key=""text"" type="Text">IS LED Enabled  and Offset correct to the manual</attribute>
<attribute key=""label"" type="Text">Full Explanation</attribute>       
        <Section4>
        <attribute key="id" type="int">307</attribute>
        <attribute key=""text"" type="Text">Have any changes been made to the vision program</attribute>
        <attribute key=""label"" type="Text">Full Explanation</attribute>       
                <Section5>
                <attribute key="id" type="int">309</attribute>
                <attribute key=""text"" type="Text">Recall another vision program has this problem cleared</attribute>
                <attribute key=""label"" type="Text">Full Explanation</attribute>
                        <Section6>
                        <attribute key="id" type="int">310</attribute>
                        <attribute key=""text"" type="Text">Amend the settings to there original condition</attribute>
                        <attribute key=""label"" type="Text">Full Explanation</attribute>
                        </Section6>
                </Section5>       
        </Section4>
        <Section4>
        <attribute key="id" type="int">308</attribute>
        <attribute key=""text"" type="Text">Are Lasers operating? producing a red light</attribute>
        <attribute key=""label"" type="Text">Full Explanation</attribute>       
                <Section5>
                <attribute key="id" type="int">313</attribute>
                <attribute key=""text"" type="Text">Check laser optical alignment and apature mask, set-up</attribute>
                <attribute key=""label"" type="Text">Full Explanation</attribute>
                </Section5>
                <Section5>
                <attribute key="id" type="int">311</attribute>
                <attribute key=""text"" type="Text">Could be a faulty laser or a laser that is turned off</attribute>
                <attribute key=""label"" type="Text">Full Explanation</attribute>       
                        <Section6>
                        <attribute key="id" type="int">312</attribute>
                        <attribute key=""text"" type="Text">Laser electrical test</attribute>
                        <attribute key=""label"" type="Text">Full Explanation</attribute>
                        </Section6>
                </Section5>
        </Section4>
</Section3>


RoyLittleo 11-10-2012 06:09 PM

Would it be better writing it like this:-
Code:

<node5>
<ItemNumber>311</ItemNumber>
<Text>Could be a faulty laser or a laser that is turned off</Text>
<Explanation>Full Explanation</Explanation>       
        <node6>
        <ItemNumber>312</ItemNumber>
        <Text>Laser electrical test</Text>
        <Explanation>Full Explanation</Explanation>       
        </node6>
</node5>



All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.