xml without indentation?

muminraif

New member
Joined
Jun 24, 2010
Messages
2
Programming Experience
Beginner
Hello,

I am trying to write a code in VB that writes something to an xml file. However, when I open the xml file by NotePad, etc. member elements start from 2 space characters inside. I tried to do all of the elements root element but it is not allowed I guess. So, do we have a solution to see the xml file like this:

<?xml version="1.0" ?>
<Map xmlns="http://www.semi.org" WaferId="" FormatRevision="SEMI G85-1101">
<Device BinType="HexaDecimal" WaferSize="300">
<ReferenceDevice ReferenceDeviceX="4" ReferenceDeviceY="4"/>
<Bin Bins="1" />
<Bin BinCode="0E" BinQuality="Pass" BinDescription="" BinCount="54" />
<Data MapName="d1.xml" CreateDate="2010062395044">
<Row><![CDATA[FFFFFFFF0EFFFFFFFF]]></Row>
<Row><![CDATA[FFFF0E0E0E0E0EFFFF]]></Row>
<Row><![CDATA[FF0E0E0E0E0E0E0EFF]]></Row>
<Row><![CDATA[0E0E0E0E0E0E0E0EFF]]></Row>
<Row><![CDATA[0E0E0E0E0E0E0E0E0E]]></Row>
<Row><![CDATA[0E0E0E0E0E0E0E0EFF]]></Row>
<Row><![CDATA[FF0E0E0E0E0E0E0EFF]]></Row>
<Row><![CDATA[FF0E0E0E0E0E0EFFFF]]></Row>
<Row><![CDATA[FFFFFF0E0E0EFFFFFF]]></Row>
</Data>
</Device>
</Map>

Instead of this:

_<?xml version="1.0" ?>
_<Map xmlns="http://www.semi.org" WaferId="" FormatRevision="SEMI G85-1101">
_spaces <Device BinType="HexaDecimal" WaferSize="300">
_spaces <ReferenceDevice ReferenceDeviceX="4" ReferenceDeviceY="4"/>
_spaces <Bin Bins="1" />
_spaces <Bin BinCode="0E" BinQuality="Pass" BinDescription="" BinCount="54" />
_spaces <Data MapName="d1.xml" CreateDate="2010062395044">
_spaces <Row><![CDATA[FFFFFFFF0EFFFFFFFF]]></Row>
_spaces <Row><![CDATA[FFFF0E0E0E0E0EFFFF]]></Row>
_spaces <Row><![CDATA[FF0E0E0E0E0E0E0EFF]]></Row>
_spaces <Row><![CDATA[0E0E0E0E0E0E0E0EFF]]></Row>
_spaces <Row><![CDATA[0E0E0E0E0E0E0E0E0E]]></Row>
_spaces <Row><![CDATA[0E0E0E0E0E0E0E0EFF]]></Row>
_spaces <Row><![CDATA[FF0E0E0E0E0E0E0EFF]]></Row>
_spaces <Row><![CDATA[FF0E0E0E0E0E0EFFFF]]></Row>
_spaces <Row><![CDATA[FFFFFF0E0E0EFFFFFF]]></Row>
_spaces </Data>
_spaces </Device>
_</Map>

ps: there are 2 character spaces where I wrote "spaces" in the code, they cant be shown normally because mailbox automatically aligns them to the left
 
Last edited:
thanks

Thank you very much, but I have to ask another thing to try that solution in my code. I have created my elements with XmlElements not with XmlWriter. Then how can I apply the settings that I have done by using that code to my document.
 
Back
Top