IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Automatically generating the Prefix Options · View
Koder
Posted: Tuesday, May 12, 2009 10:47:41 PM
Rank: Newbie

Joined: 5/12/2009
Posts: 1
Location: San Diego
Is there a way of automatically generating a tags prefix.

When I use
root.MyHeader.First.DocumentSource_Organization.Append().OrganizationORIID.Append().ID.Append().Value = "nnnnn"; root.MyHeader.First.DocumentDestinationID.Append().ID.Append().Value = "JD";

I get

<DocumentSource.Organization xmlns="http://www.it.ojp.gov/jxdm/3.0">

<OrganizationORIID>

<ID>nnnnn</ID>

</OrganizationORIID>
</DocumentSource.Organization>

I want to have
<j:DocumentSource.Organization>
<j:OrganizationORIID>
<j:ID>AR1137000</j:ID>
</j:OrganizationORIID>
</j:DocumentSource.Organization>

with out having to code each tag manually like:


root.MyInquiryHeader.First.DocumentSource_Organization.Append().OrganizationORIID.Append().ID.Append().Value = "nnnnn";
root.MyInquiryHeader.First.DocumentSource_Organization.First.Node.Prefix = "j";
root.MyInquiryHeader.First.DocumentSource_Organization.First.OrganizationORIID.First.Node.Prefix = "j";
root.MyInquiryHeader.First.DocumentSource_Organization.First.Node.Prefix = "j";
root.MyInquiryHeader.First.DocumentDestinationID.Append().ID.Append().Value = "JD";
root.MyInquiryHeader.First.DocumentSource_Organization.First.OrganizationORIID.First.ID.First.Node.Prefix = "j";

Is there a way that I can globally set the namespace prefix?

TIA


Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.