Using the XmlTextWriter class, how would I write out the line bolded below with the results shown below:
Code:
<?xml version="1.0" ?>
<?qbxml version="2.0"?>
<QBXML>
<QBXMLMsgsRq onError = "stopOnError">
<CustomerAddRq requestID = "1">
<CustomerAdd>
<Name>Some Guy</Name>
</CustomerAdd>
</CustomerAddRq>
</QBXMLMsgsRq>
</QBXML>
I am trying to start an element but also include addt'l information...
namely, onError = "stopOnError"
If I use
VB Code:
myXml.WriteStartElement("QBXMLMsgsRq onError='stopOnError'", Nothing)
I get this
where the ending tag also includes the extra info)
Code:
<?xml version='1.0' ?>
<QBXML>
<QBXMLMsgsRq onError='stopOnError'>
<CustomerAddRq requestID='1'>
<CustomerAdd>
<Name>Karl</Name>
</CustomerAdd>
</CustomerAddRq requestID='1'>
</QBXMLMsgsRq onError='stopOnError'>
</QBXML>ML>
Now obviously I know why it makes the end tag the same...but I can't figure out how to get around that...
I want the bolded line above to just read </QBXMLMsgsRq>. In case you are wondering, this is xml structured request for adding a customer to Intuit's Quickbooks.