private void ParseElementAttributes(JsonWriter writer) { if (!current.HasAttributes) return; current.MoveToFirstAttribute(); do { string attributeName = GetCurrentAttributeName(); string attributeValue = current.Value; writer.WriteProperty(attributeName, attributeValue); } while (current.MoveToNextAttribute()); current.MoveToElement(); }
private void ParseElement(JsonWriter writer) { writer.StartBlock(); writer.WriteProperty("$ElementType", current.LocalName); ParseElementAttributes(writer); ParseElementChildren(writer); writer.EndBlock(); }