Click here to Skip to main content
16,010,334 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Problem with XPathNavigator Pin
Josh Smith5-May-06 8:10
Josh Smith5-May-06 8:10 
GeneralRe: Problem with XPathNavigator Pin
RoadieGS5-May-06 8:19
RoadieGS5-May-06 8:19 
GeneralRe: Problem with XPathNavigator Pin
Josh Smith5-May-06 8:41
Josh Smith5-May-06 8:41 
GeneralRe: Problem with XPathNavigator Pin
RoadieGS5-May-06 8:55
RoadieGS5-May-06 8:55 
GeneralRe: Problem with XPathNavigator Pin
George L. Jackson5-May-06 9:00
George L. Jackson5-May-06 9:00 
AnswerRe: Tree View in XSL?? Pin
led mike5-May-06 5:39
led mike5-May-06 5:39 
GeneralRe: Tree View in XSL?? Pin
led mike5-May-06 7:57
led mike5-May-06 7:57 
QuestionWeird XML Issue with C# Pin
seschu013-May-06 4:22
seschu013-May-06 4:22 
Ok, I have a predefined XML set that looks like the following:

<?xml version="1.0" encoding="UTF-8"?><Order_Invoice_Outgoing_Array_Element><Order_Invoice_Outgoing_Element><interface_transaction>11767</interface_transaction><order_Invoice_Header><vendor>999964</vendor><invoice>AM12345</invoice><currency>USD</currency><invoice_Category>ORDER</invoice_Category><invoice_Date>2006-05-01T00:00:00.000-04:00</invoice_Date><invoice_Due_Date>2006-05-31T00:00:00.000-04:00</invoice_Due_Date><terms>NET30</terms><invoice_Amount_Total>745.26</invoice_Amount_Total><status>CLOSED</status><currency_Exchange_Rate>1</currency_Exchange_Rate><order_Type_Optional>PO</order_Type_Optional><order_Number_Optional>88001233</order_Number_Optional><pay_Indicator>AP</pay_Indicator><original_Invoice_Amount>745.26</original_Invoice_Amount><GL_Account /><voucher>1</voucher><created_By>AMORENO</created_By><created_Date>2006-05-01T19:01:54.000-04:00</created_Date><modified_By>AMORENO</modified_By><modified_Date>2006-05-01T19:10:12.000-04:00</modified_Date><line_Sum>745.26</line_Sum><AP_System_Received_Flag>false</AP_System_Received_Flag><paid_Flag>false</paid_Flag></order_Invoice_Header><order_Invoice_Lines><order_Invoice_Line><order_Type>PO</order_Type><order_Line>1</order_Line><order_Number>88001233</order_Number><invoice_Category>ORDER</invoice_Category><invoice_Date>2006-05-01T00:00:00.000-04:00</invoice_Date><invoice_Amount>745.26</invoice_Amount><invoiced_Qty>1</invoiced_Qty><GL_Account><GL_Company>160811</GL_Company><GL_Expenditure>0</GL_Expenditure><GL>0</GL><GL_Cost_Center>0</GL_Cost_Center><GL_Description>AIRFRAME ROTABLES - A300</GL_Description><GL_Category>ALL</GL_Category><modified_By>GLACCOUNT</modified_By></GL_Account><status>PAID</status><credit_Memo_Cost>0</credit_Memo_Cost><created_By>AMORENO</created_By><created_Date>2006-05-01T19:02:42.000-04:00</created_Date><modified_By>AMORENO</modified_By><modified_Date>2006-05-01T19:10:12.000-04:00</modified_Date><line_Amount>745.26</line_Amount><location>ILN</location><Order_Detail_Lines><Order_Detail_Line><order_Line>1</order_Line><delivery_Date>2006-05-31T00:00:00.000-04:00</delivery_Date><PN><PN_Interchangeable>622-0118-001</PN_Interchangeable><PN_Main>622-0118-001</PN_Main><PN_Category>ARA300B4</PN_Category></PN><QTY_Require>1</QTY_Require><unit_Of_Measurement>EA</unit_Of_Measurement><unit_Cost>745.26</unit_Cost><modified_Date>2006-05-01T19:00:22.000-04:00</modified_Date><ship_To_Location>ILN</ship_To_Location><capital_Expenditure>280-041-001</capital_Expenditure></Order_Detail_Line></Order_Detail_Lines></order_Invoice_Line></order_Invoice_Lines></Order_Invoice_Outgoing_Element><Order_Invoice_Outgoing_Element><interface_transaction>11773</interface_transaction><order_Invoice_Header><vendor>P00001</vendor><invoice>AM00123</invoice><currency>USD</currency><invoice_Category>ORDER</invoice_Category><invoice_Date>2006-05-01T00:00:00.000-04:00</invoice_Date><invoice_Due_Date>2006-05-31T00:00:00.000-04:00</invoice_Due_Date><terms>NET30</terms><invoice_Amount_Total>512.7</invoice_Amount_Total><status>CLOSED</status><currency_Exchange_Rate>1</currency_Exchange_Rate><order_Type_Optional>RO</order_Type_Optional><order_Number_Optional>88001234</order_Number_Optional><pay_Indicator>AP</pay_Indicator><original_Invoice_Amount>512.7</original_Invoice_Amount><GL_Account /><voucher>2</voucher><created_By>AMORENO</created_By><created_Date>2006-05-01T19:42:17.000-04:00</created_Date><modified_By>AMORENO</modified_By><modified_Date>2006-05-01T19:51:09.000-04:00</modified_Date><line_Sum>512.7</line_Sum><AP_System_Received_Flag>false</AP_System_Received_Flag><paid_Flag>false</paid_Flag></order_Invoice_Header><order_Invoice_Lines><order_Invoice_Line><order_Type>RO</order_Type><order_Line>2</order_Line><order_Number>88001234</order_Number><invoice_Category>ORDER</invoice_Category><invoice_Date>2006-05-01T00:00:00.000-04:00</invoice_Date><invoice_Amount>256.35</invoice_Amount><invoiced_Qty>1</invoiced_Qty><GL_Account><GL_Company>443120</GL_Company><GL_Expenditure>809</GL_Expenditure><GL>A300B4</GL><GL_Cost_Center>0</GL_Cost_Center><GL_Description>REPAIR ORDERS</GL_Description><GL_Category>ALL</GL_Category><modified_By>GLACCOUNT</modified_By></GL_Account><status>PAID</status><resolved_By>AMORENO</resolved_By><resolved_On>2006-05-01T19:45:22.000-04:00</resolved_On><credit_Memo_Cost>0</credit_Memo_Cost><created_By>AMORENO</created_By><created_Date>2006-05-01T19:43:45.000-04:00</created_Date><modified_By>AMORENO</modified_By><modified_Date>2006-05-01T19:51:09.000-04:00</modified_Date><line_Amount>256.35</line_Amount><location>ILN</location><Order_Detail_Lines><Order_Detail_Line><order_Line>2</order_Line><delivery_Date>2006-06-05T00:00:00.000-04:00</delivery_Date><PN><PN_Interchangeable>622-0118-001</PN_Interchangeable><PN_Main>622-0118-001</PN_Main><PN_Category>ARA300B4</PN_Category></PN><QTY_Require>1</QTY_Require><unit_Of_Measurement>EA</unit_Of_Measurement><unit_Cost>0</unit_Cost><modified_Date>2006-05-01T19:38:59.000-04:00</modified_Date><SN>34567</SN><batch>328255</batch><ship_To_Location>ILN</ship_To_Location><capital_Expenditure>315-042-011</capital_Expenditure></Order_Detail_Line></Order_Detail_Lines></order_Invoice_Line><order_Invoice_Line><order_Type>RO</order_Type><order_Line>1</order_Line><order_Number>88001234</order_Number><invoice_Category>ORDER</invoice_Category><invoice_Date>2006-05-01T00:00:00.000-04:00</invoice_Date><invoice_Amount>256.35</invoice_Amount><invoiced_Qty>1</invoiced_Qty><GL_Account><GL_Company>443120</GL_Company><GL_Expenditure>809</GL_Expenditure><GL>A300B4</GL><GL_Cost_Center>0</GL_Cost_Center><GL_Description>REPAIR ORDERS</GL_Description><GL_Category>ALL</GL_Category><modified_By>GLACCOUNT</modified_By></GL_Account><status>PAID</status><credit_Memo_Cost>0</credit_Memo_Cost><created_By>AMORENO</created_By><created_Date>2006-05-01T19:43:45.000-04:00</created_Date><modified_By>AMORENO</modified_By><modified_Date>2006-05-01T19:51:09.000-04:00</modified_Date><line_Amount>256.35</line_Amount><location>ILN</location><Order_Detail_Lines><Order_Detail_Line><order_Line>1</order_Line><delivery_Date>2006-06-05T00:00:00.000-04:00</delivery_Date><PN><PN_Interchangeable>622-0118-001</PN_Interchangeable><PN_Main>622-0118-001</PN_Main><PN_Category>ARA300B4</PN_Category></PN><QTY_Require>1</QTY_Require><unit_Of_Measurement>EA</unit_Of_Measurement><unit_Cost>256.35</unit_Cost><modified_Date>2006-05-01T19:38:15.000-04:00</modified_Date><SN>23456</SN><batch>328254</batch><ship_To_Location>ILN</ship_To_Location><capital_Expenditure>280-052-017</capital_Expenditure></Order_Detail_Line></Order_Detail_Lines></order_Invoice_Line></order_Invoice_Lines></Order_Invoice_Outgoing_Element></Order_Invoice_Outgoing_Array_Element>

My program grabs this XML which is returned as a String type fom a 3rd party API and then must parse it and insert it into another database. I am able to populate a Tree View with the information but anytime I try to add the XML to a dataset I get "Illegal Characters in Path" errors or "Child list for field Order_Invoice_Outgoing_Array_Element cannot be created"...

Generally it is the later when using the code listed below.

Here is the code I am using to pull the XML:

<pre>

WindowsApplication1.aero.trax.weblogs.order_invoice_service.Order_Invoice_ServiceService service = new WindowsApplication1.aero.trax.weblogs.order_invoice_service.Order_Invoice_ServiceService();
WindowsApplication1.aero.trax.weblogs.order_invoice_service.Order_Invoice_Query_Parameter_Element query = new WindowsApplication1.aero.trax.weblogs.order_invoice_service.Order_Invoice_Query_Parameter_Element();
service.Timeout = 100000000;
query.getOnlyUnSentRecords = true;

String s_invoices;
s_invoices = service.queryRecordsReturnString(query);
XmlDocument doc = new XmlDocument();
doc.InnerXml = s_invoices;
XmlElement root = doc.DocumentElement;

treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode(doc.DocumentElement.Name));
TreeNode tNode = new TreeNode();
tNode = treeView1.Nodes[0];

AddNode(doc.DocumentElement, tNode);
treeView1.ExpandAll();

DataSet myData = new DataSet();
dataGridView1.DataSource = doc.DocumentElement;
dataGridView1.DataMember = "Order_Invoice_Outgoing_Array_Element";
dataGridView1.Refresh();
</pre>

Now here is one method I am using to populate the Recordset that is failing (basically any method I use fails)...

Also, if I modify the code to actually use the dataset and XML data as follows:

myData.WriteXml(doc.InnerXml);
dataGridView1.DataSource = myData;
dataGridView1.DataMember = "Order_Invoice_Outgoing_Array_Element";
dataGridView1.Refresh();

That is when I get the illegal characters in path error...

-- modified at 10:28 Wednesday 3rd May, 2006
AnswerRe: Weird XML Issue with C# Pin
led mike5-May-06 5:48
led mike5-May-06 5:48 
QuestionQueries on MSXML Validation Pin
ssanand3-May-06 0:55
ssanand3-May-06 0:55 
QuestionxmlObjectDataSource not work with namespace Pin
erikkl200030-Apr-06 7:44
erikkl200030-Apr-06 7:44 
QuestionHelp me description of class CXmlFile ! Pin
vnsoftware28-Apr-06 17:44
vnsoftware28-Apr-06 17:44 
QuestionFOP Table Alignment Pin
Support12328-Apr-06 4:34
Support12328-Apr-06 4:34 
AnswerPS Pin
Support12328-Apr-06 4:35
Support12328-Apr-06 4:35 
Questionhow to write this XPath expression? Pin
alaa2227-Apr-06 7:25
alaa2227-Apr-06 7:25 
AnswerRe: how to write this XPath expression? Pin
rdxMatrix27-Apr-06 7:58
rdxMatrix27-Apr-06 7:58 
AnswerRe: how to write this XPath expression? Pin
Stuart Dootson27-Apr-06 9:45
professionalStuart Dootson27-Apr-06 9:45 
AnswerRe: how to write this XPath expression? Pin
Graham Nimbley27-Apr-06 15:33
Graham Nimbley27-Apr-06 15:33 
GeneralRe: how to write this XPath expression? Pin
alaa2227-Apr-06 23:42
alaa2227-Apr-06 23:42 
GeneralRe: how to write this XPath expression? Pin
George L. Jackson28-Apr-06 17:36
George L. Jackson28-Apr-06 17:36 
GeneralRe: how to write this XPath expression? Pin
Graham Nimbley2-May-06 2:47
Graham Nimbley2-May-06 2:47 
Questionhtml access to different stylesheets of the same xml file Pin
User 58261925-Apr-06 23:04
User 58261925-Apr-06 23:04 
QuestionXSD Restrictions help please Pin
cechode25-Apr-06 5:20
cechode25-Apr-06 5:20 
AnswerRe: XSD Restrictions help please Pin
Stuart Dootson25-Apr-06 7:35
professionalStuart Dootson25-Apr-06 7:35 
GeneralRe: XSD Restrictions help please Pin
cechode25-Apr-06 8:00
cechode25-Apr-06 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.