Advanced XML Creation using Helper class created by XSD.EXE from a schema

I'm going to paste the section of the helper class below.  What I
can't figure out is really what is required or how to set the value
for the item - Identification which is of type PharmacyID.  Language
is C#.

Here's my code attempt and where I'm stuck:

            PharmacyIDType ID = new PharmacyIDType();
            ItemsChoiceType it = new ItemsChoiceType();
            // choicetype?
           //  it. in the editor doesn't give me any options to set a
value - only a name
          // ID. offers an ItemsElementName which I will set to "it"
and is of ItemsChoiceType
            ID.Items[0]=NCPDPID; // passed parm with the id number a
string.
            rqpharmacy.Identification = ID;

I just don't know how to set the value for a type that ultimately has
is an "enum".

The helper class section:

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.s.com/
messaging")]
public partial class PharmacyIDType {

    private string[] itemsField;

    private ItemsChoiceType[] itemsElementNameField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("BINLocationNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("DEANumber", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("FileID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("HIN", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("MedicaidNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("MedicareNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("NAICCode", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("NCPDPID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("NPI", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("PPONumber", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("PayerID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute
("PriorAuthorization", typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("PromotionNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("SecondaryCoverage",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("SocialSecurity",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute
("StateLicenseNumber", typeof(string))]
    [System.Xml.Serialization.XmlChoiceIdentifierAttribute
("ItemsElementName")]
    public string[] Items {
        get {
            return this.itemsField;
        }
        set {
            this.itemsField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public ItemsChoiceType[] ItemsElementName {
        get {
            return this.itemsElementNameField;
        }
        set {
            this.itemsElementNameField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.s.com/
messaging", IncludeInSchema=false)]
public enum ItemsChoiceType {

    /// <remarks/>
    BINLocationNumber,

    /// <remarks/>
    DEANumber,

    /// <remarks/>
    FileID,

    /// <remarks/>
    HIN,

    /// <remarks/>
    MedicaidNumber,

    /// <remarks/>
    MedicareNumber,

    /// <remarks/>
    NAICCode,

    /// <remarks/>
    NCPDPID,

    /// <remarks/>
    NPI,

    /// <remarks/>
    PPONumber,

    /// <remarks/>
    PayerID,

    /// <remarks/>
    PriorAuthorization,

    /// <remarks/>
    PromotionNumber,

    /// <remarks/>
    SecondaryCoverage,

    /// <remarks/>
    SocialSecurity,

    /// <remarks/>
    StateLicenseNumber,
}
0
10/29/2009 6:18:17 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
1969 Views

Similar Articles

[PageSpeed] 35

Reply:

Similar Artilces:

Logo created in Word, not recognized as an image
I created a killer logo in MS Word and I cannot use it, because it is not recognized as an image file. I also cannot recreate it. Help!! Bring up the logo in Word. Go to HELP. type in: convert .doc file to image file. One of your choices will be to convert to a .TIFF. If this will work...follow the directions. Tlmh99 wrote: > I created a killer logo in MS Word and I cannot use it, because it is not > recognized as an image file. I also cannot recreate it. Help!! Can you not simply copy and paste into Publisher. Select paste special and choose the best format. -- Mary Sauer M...

Using Publisher for long reports
Hi. I write long reports (50 pages) in which layout and style are very important. I'm thinking of switching from Word to Publisher since Word's management of pictures and layout drives me wild. Can anyone advise me if Publisher might be the right choice? Does anyone have some long document templates they could show me? -- Giles It sounds like Publisher would be perfect for you since you indication that the layout is important. I can't help with a sample tho because (1) the longest I've done is about 24 pages and (2) my newsletters contain personal contact information and...

how do I create qif files from Excel for import into Quicken?
Want to import a bunch of financial data that's in Excel into Quicken. Can I create a QIF file from Excel? You'll need a converter utility for this. Here's a google search that might help: http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLD,GGLD:2004-31,GGLD:en&q=convert+excel+to+quicken tj "pb" wrote: > Want to import a bunch of financial data that's in Excel into Quicken. > Can I create a QIF file from Excel? Hi *pb*, See if http://xl2qif.chez.tiscali.fr/xl2qif_en.php suits your purpose. Don't forget to back up the folde...

How can I use my calendar and other features wo using Outlook emai
I have Windows7 OS. I upgraded to MSO 2007. I cannot access the calendar, etc. without setting up an email profile which my ISP will not allow using the email address. How can I use my calendar and other features without using Outlook email? I could use the calendar on previous versions without setting up an email account. Why can't you use Outlook w/o a mail profile? What happens when you try? -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. ALWAYS post your Outlook version. How to ask a question: http://support.microsoft....

Can I delete OE and just use Microsoft Outlook 2002
I would like to delete Outlook Express is this advisable? I am going to be using Microsoft Outlook 2002 which I recieved w/Toshiba PDA and already have it set up on the same PC as OE. Can I use Microsoft Outlook for multiple e- mail accounts? Differences Between Outlook and Outlook Express http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257824 With Outlook, you can integrate and manage e-mail from multiple e-mail accounts, personal and group calendars, contacts, and tasks. "Delia Marlowe" <anonymous@discussions.microsoft.com> wrote in message news:780901c4025...

Advanced find
In advance find a customer wishes to know how many of each product an account has ordered. The Order lines, Quote Lines, Invoice Lines are not available as output entities. Therefore no reporting on advanced find is avaiable. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message...

How do I open doc's from Publisher 2000 when I am using Pub 2003?
I recently purchased Publisher 2003 and can't seem to edit any document from a previous version. Are you running Norton AV? Try disabling NAV Script Blocking ~~~~~~~~~~~~~~~~~~~~ Start NAV Click Options. If a menu appears when you click Options, then click NortonAntiVirus. The Norton AntiVirus Options dialog box appears. Click Script Blocking. Uncheck Enable Script Blocking (recommended). Click OK. Restart the computer if prompted to do so. -- JoAnn Paules MVP Microsoft [Publisher] "GAR" <GAR@discussions.microsoft.com> wrote in message news:01222D01-7A00-4...

Referencing .NET 2.0 but end result uses .NET 3.5
I'm using DevStudio 2005 and I have a project that references System.dll ver 2.0.50727 and I accidentally compiled code that used an overload that only exists in version 3.5 because my intellisense showed it. I tried to compile it on another machine that never had the .NET 3.5 install and it wouldn't compile and the intellisense had that version of the overload yet both references looked identical; looking at ver 2.0 of System.dll The method in question was WaitHandle.WaitOne. ..NET 2.0 WaitOne() WaitOne(Int32, Boolean) WaitOne(TimeSpan, Boolean) ..NET 3.5 WaitOne...

"Play a selected sound" in "create Rule"
I want to use "create rule' "play a selected sound" to notify me of messages from certain people. Screen is on "Create Rule" & "play a selected sound" is not checked. The box beside "play a selected sound" says "chimes.wav" When I check box for "play a selected sound" & do "Browse" to get to 'Control Panel' 'Sounds and Audio Devices', I get the message: 'The file name, or format 'Control Panel" is not valid. Type the file name and location in the correct format, such as...

CBitmap class question
I use CBitmap::CreateBitmap create a CBitmap object, and sets the bit datas by CBitmap::SetBitmapBits, but I can not display it on the screen(ie. use CDC::BitBlt), which step do I miss? Thanks for any idea. My codes like: CBitmap bmp; bmp.CreateBitmap(50,50,1,24,NULL); //24 bit colors bmp.SetBitmapBits(bufLen, pBuf); //pBuf points to valid data CDC dcMem; dcMem.CreateCompatibleDC(pDC); dcMem.SelectObject(&bmp); pDC->BitBlt(0,0,50,50,&dcMem,0,0,SRCCOPY); // fault! can not display the map. This is what you need:- http://support.microsoft.com/default.a...

Who created this monster!
I knew how to do this the last time I used Excel last year. I have Excel 2000. I have a worksheet with a number of columns. Row 1 contains column headings. Row 2 contains data. Most of the cells are text. Some are numbers. A few have formulas, like =(C2*10) + (D2*5). Row 3 contains some column totals and is always meant to be the last row. Now I have entered all the data in row 2 and at the last column of my data. How do I open a new row following the row I just entered maintaining the formulas but automatically adjusting the references? This would be a new row 3. The totals row would ...

Using a drop down box to select all results
I have a summary page which pulls data together from several sheets an displays summary statistics etc. I want to be able to use a drop down list to select particular product and only show data relating to those products - so far so good. But ..... having put in my drop down and referenced it in my formulae now cannot show the summary data for ALL products. Is there a wildcard that can be used in drop downs to select all -- Message posted from http://www.ExcelForum.com You could add (All) to your list of products, and check for that selection in the formula. For example: =IF(A2=...

Creating New GP Company
I am in the process of creating a new GP Data Company – normally I just go to utilities and select “Create A Company” and I am good to go. This time however when I create the new company not all of the Manufacturing tables/stored procedures are created. I know that I have successfully created new companies prior to me installing SP5. When I log into the new company I get the following error: SQLServer souldnot find the stored procedure ‘CDA01.dbo.msysCompDoseMfgCompExist’ then invalid object name ‘ICJC6000’ When I actually try to go into a MOP module I get a message stating that M...

using interop to create document word 2007
I am using c# and word interop to open a mailmerge document fill it in and then display it to the user. Once i display it the c# app has nothing more to do with the word document. The user can edit it as needed and then save it as a pdf and that is fine. The issue is I would like to set the default path for the document and it could be a network drive or sharepoint and will change every time also it will never be where the original document was opened. ...

Can I use Free Excel Viewer 97/2000 in Windows XP?
Microsoft downloads doesn't list the free excel viewer compatible with Windows XP. Is there a free download to view and print excel spreadsheets, that's compatible with Windows XP? Linda The Viewer for Office 97/2000 works fine under Windows XP. Gord Dibben Excel MVP On Fri, 22 Oct 2004 15:11:01 -0700, "Linda" <Linda@discussions.microsoft.com> wrote: >Microsoft downloads doesn't list the free excel viewer compatible with >Windows XP. Is there a free download to view and print excel spreadsheets, >that's compatible with Windows XP? Linda An...

creating a program that uses data from a sensor....
Hello, I want to create an MFC program that uses parameter values passed to it from a meter (specifically the resistance in ohms of resisters in an electronic circuit). What are the hardware components that would be needed? And what MFC class(es) would I use to accomplish this? Thanks, RABMissouri2006 On 21 Oct 2006 08:10:50 -0700, "RAB" <rabmissouri@yahoo.com> wrote: >Hello, > >I want to create an MFC program that uses parameter values passed to it >from a meter (specifically the resistance in ohms of resisters in an >electronic circuit). What are the ha...

Programmatically creating a pass-through query
Hi, Is there a way to programmatically create pass-through query in Access 2003? Sub test () Dim db As Database Dim strSQL As String Dim qdfs As QueryDefs Dim qdf As QueryDef strSQL ="Some pass-through SQL statement here" Set db = CurrentDb Set qdfs = db.QueryDefs Set qdf = db.CreateQueryDef("qry_PassThru", strSQL) qdf.SQL = strSQL End Sub But the code about will not create a pass-through query, Access thinks it is a regular Access query. Is there a way to specify ...

Error while creating custom entity
Hi I am trying to create a custom entity. After filling the required fields on the New Custom Entity form, when i am trying to save it, i am getting the following error: " An error has occured. For more information, contact your system administrator". Help appreciated. Thanks Same issue here. Currently I'm busy troubleshooting, but no results yet. I tried the following without result: Enable logging by adding keys to the registry: LogPerfData: filename LogPerfDataDetails: 1 LogPerfDataLevel: 2 Repare CRM by using the installation disk. Did you make any progress resolvi...

using excel from dotnet
situation: I'm working on a new app in vbexpress 2008 using acad com interop Also need to write extracted data to excel. problem: At home(laptop) i have excel 10. At the office excel 12. (both seem to have excel5 listed in refs.) I need to work at both locations. can i reference both 10 and 12 in the same vbproj (i think not) can i just reference 5 and is that just an older version with common (but not the latest) interface? i guess i can just have 2 vbproj files (one on laptop one at work) and just copy the .vb class files that are being edited back and forth, not cop...

how to use outlook w/o exchange server?
Trying to use outlook and cannot send/receive email. error msg 0x8004010F. I work from home, have no employess, no need to share address book. Just trying to use it w/ a new PDA I have. The exchange server appears to be a fee based service - I don't know. I just want to use Outlook to schedule my appts, keep contacts and use email. SMScott <SMScott@discussions.microsoft.com> wrote: > Trying to use outlook and cannot send/receive email. error msg > 0x8004010F. I work from home, have no employess, no need to share > address book. Just trying to use it w/ a new PDA ...

how do i ignore a number when using MODE function?
Hi I have a list of numbers that I want to find the MODE in: 0 0 1 2 0 0 3 3 2 2 2 0 0 But I want to be able to ignore the Zeros How do i go about doing this so the mode function gives me the #2 only Thank you -- Dev4me ------------------------------------------------------------------------ Dev4me's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29709 View this thread: http://www.excelforum.com/showthread.php?threadid=498091 =MODE(IF(A1:A20<>0,A1:A20)) which is an array formula, so commit with Ctrl-Shift-Enter -- HTH RP (remove nothere from the...

Using VBA to find a value and select a range
I am trying to write a macro that will let me find a specific vale in a specific column, then select part of the row that the value is in, beginnign with a column 31 cells away from the column that the specific value is in. Someone suggested to me that I use an IF statement, but this is all I know about that: IF [value in column B] is “Grand Total” Then select from column AF to the end of the array in that row and copy it and paste a transpose of the values starting in cell I9 of worksheet X. What is the best way for me to accomplish this goal? Does this macro do what you...

Using TEXT and &TEXT
I'm familiar with the TEXT function, but sometimes a number will display incorrectly when I format numbers to display with a comma if 4 digits or more. For example, TEXT(F1,"0,0") will display 10 thru 999 correctly and displays 1000 correctly as 1,000, but displays 1 thru 9 as 01, 02, etc. Also wondering how to format part of a TEXT formula to underline, and bold or color selected words. Maybe you want: =text(f1,"#,###") or =text(f1,"#,##0") If this doesn't help, maybe you could post the values and what you want to see for a few exa...

Create Form Dynamically in VBA
Without going into alot of details I need to create thru code and dynamically a FORM in Datasheet View with a recordsource is an exisiting query. Can this be done in code on the fly. I also need code that deletes or purges the same form object. thanks for any help. Why? It is not a good idea. Perhaps if you described what you want to do, we can help with a how. -- Dave Hargis, Microsoft Access MVP "Bret" wrote: > Without going into alot of details I need to create thru code and dynamically > a FORM in Datasheet View with a recordsource is an exisiting query. Can th...

Create/Update Excel Objects in Power Point
I developed an add-in in Power Point 97, 2000, XP and 2003 for creating Excel charts/tables and being able to update them. The code I used is below: Dim PPT_CHRT As OLEFormat Dim PPT_SLD As Slide 'ADD a chart/table PPT_SLD.Shapes.AddOLEObject Left:=var_chrt_L, Top:=var_chrt_T, Width:=var_chrt_W, Height:=var_chrt_H, ClassName:="Excel.Chart.8", Link:=msoFalse Set PPT_CHRT = PPT_SLD.Shapes(var_SHP_count_no).OLEFormat PPT_SLD.Shapes(var_SHP_count_no).Select 'EDIT chart/table Set PPT_SLD = ActivePresentation.Slides(var_SHP_SLD_no) Set PPT_CHRT...