BizTalk Server General - How do I specificy namespace in XML output (for a specific element

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > How do I specificy namespace in XML output (for a specific element





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How do I specificy namespace in XML output (for a specific element
Mick

2004-11-12, 7:48 am

How do you specificy another namespace for a specific element? I have this
XML schema file (made using Biztalk 2002 - all not-related info removed for
clarity):

<?xml version="1.0"?>
<!-- Generated by using BizTalk Editor on Fri, Nov 12 2004 12:43:00 PM -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<Schema name="IdealXML" b:BizTalkServerEditorTool_Version="1.5"
b:root_reference="IdealXML" b:version="1.0" b:standard="XML"
b:target_namespace="Request" xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:b="urn:schemas-microsoft-com:BizTalkServer"
xmlns:d="urn:schemas-microsoft-com:datatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<b:SelectionFields/>
<ElementType name="Request" content="eltOnly" order="seq" model="open">
<b:RecordInfo/>
<AttributeType name="command" d:type="string" d:maxLength="10">
<b:FieldInfo/></AttributeType>
<attribute type="command" required="no" default="commit"/>
<element type="CurrentOrder" maxOccurs="1" minOccurs="0"/>
</ElementType><ElementType name="IdealXML" content="eltOnly" order="seq"
model="closed">
<b:RecordInfo/>
<AttributeType name="version" d:type="string">
<b:FieldInfo/></AttributeType>
<AttributeType name="requestid" d:type="string">
<b:FieldInfo/></AttributeType>
<attribute type="version" required="no" default="1.0"/>
<attribute type="requestid" required="no" default="Unique number 123"/>
<element type="Request" maxOccurs="1" minOccurs="0"/>
</ElementType><ElementType name="CurrentOrder" content="empty" model="closed">
<b:RecordInfo/>
<AttributeType name="CompanyID" d:type="string" d:maxLength="10">
<b:FieldInfo/></AttributeType>
<attribute type="CompanyID" required="no" default="22494"/>
</ElementType></Schema>

Here's the XML output:

<IdealXML xmlns="Request" version="version_1" requestid="requestid_1">
<Request command="command_1">
<CurrentOrder CompanyID="CompanyID_"></CurrentOrder>
</Request>
</IdealXML>

Note the <CurrentOrder> element. How do I modify my schema (and where) to
get this XML output instead:

<IdealXML xmlns="Request" version="version_1" requestid="requestid_1">
<Request command="command_1">
<CurrentOrder xmlns="aaa" CompanyID="CompanyID_"></CurrentOrder>
</Request>
</IdealXML>

the difference being that <CurrentOrder> now has xmlns="aaa" specified?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com